If I forget to free() my memory, is that part of the RAM wasted forever or is it eventually garbage collected anyway even if C doesn't have such a feature?
>>54980631
Only when you exit your application.
>>54980631
It release the memory when you close your program
>>54980631
The RAM is allocated forever. The computer can't spare the clock cycles to keep track of it. The only solution is to buy more RAM. This is why modern languages have global garbage collection. Call free() or brick your computer
>>54980631
The memory is disabled in hardware and is forever lost. The only way to fix it is to buy new RAM.
>>54980741
>>54980734
this desu
>>54980734
>>54980741
These two are lying, OP.
The operating system allocates and keeps track of the memory for each process whenever an application requests it. And then it cleans it all up when the process exits.
Don't care if OP might be trolling or pretending, but some people might still be interested in knowing.
This is also a great read for learning more about RAM:
http://stackoverflow.com/a/662454
>>54980631
Guys if some languages have automatic garbage collection, then why is OP still here?
>>54980631
What happens is that you no longer have any way to free it because you lost the pointer.
It'll get released back to the OS when you exit the application.
>>54980854
OP is allocated forever and will always be in this thread.
>>54982090
Maybe if people like you shitpost enough, we can cause enough memory leaks to crash the 4chan servers.
>>54980631
congrats on using a tool you don't want to use properly
have fun with your shit code reviews
https://www.youtube.com/watch?v=JimUMZTiAjo
>>54980819
>Non hostile, constructive reply
>on /g/
leave now, before this place defiles you forever
>>54983840
I've been here for a while Anon, and I try to be helpful wherever I can, even with all the rampant shitposting here in /g/.
If people like me didn't ignore shitposters and try to be constructive, /g/ would be more kill than it already is.
You should strive to do the same, Anon.
>>54983840
sweating bullets
ESC+SHIFT+CTRL
R-R-R-Rightclick
EEEEEEE EEEEEEEEE EEEEE Eeee3eee eeeere eeee4 eee eeeeee3ee e3333 333e33 333333333 333 333e ee eehee eeeee eeee eeeee EEEEEEEEEEnd Process
Phew! great thing i exited before my program blew up!
>>54983877
nope, save the thought posts for shreddit, /g/ is for gangsters
>>54983877
godspeed, you absolute madman.