[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

If I forget to free() my memory, is that part of the RAM wasted

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 18
Thread images: 4

File: Poklonskaya.jpg (176KB, 640x581px) Image search: [Google]
Poklonskaya.jpg
176KB, 640x581px
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.
>>
File: 1429629326769.jpg (15KB, 160x160px) Image search: [Google]
1429629326769.jpg
15KB, 160x160px
>>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
>>
File: peter.jpg (90KB, 640x480px) Image search: [Google]
peter.jpg
90KB, 640x480px
>>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.
>>
File: 1463702982666.jpg (81KB, 720x594px) Image search: [Google]
1463702982666.jpg
81KB, 720x594px
>>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.
Thread posts: 18
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.