Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Automatically reclaim memory from leaky programs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Automatically reclaim memory from leaky programs
Authored by: Superboy on Apr 12, '12 11:19:07AM

As others have stated, this hint is completely incorrect. It doesn't reclaim memory from leaky programs.

As the OS runs and the user opens apps, spare (or free) memory is filled up with data that's read directly from the disk, making subsequent accesses to the same data much faster. The part of memory used for disk caching is known as "inactive" memory. Purging this inactive memory increases free RAM yes, but at the expense of forcing all the cached data to be re-read from disk when it's needed. This is bad not only because the HDD is hundreds of times slower than RAM, but also because much of the data that's being reloaded from disk has to be processed again. If an app really needs more memory than is available at a given time, the OS will intelligently purge stale "inactive" memory pages, increasing free memory as required.

There really is no need to purge RAM when inactive memory reaches XXXmb. "Purge" is a debugging tool, it's not supposed to be used willy nilly, it's especially useless in that it actually slows down the OS.

I'm pretty sure Apple is au fait with how their OS works, they'd build an auto-memory-purger into the kernel if it was necessary. Apple removed all the memory freeing apps from the App Store a few years ago, shouldn't that be a good enough sign that it's not a good thing to do?

Edited on Apr 12, '12 11:19:32AM by Superboy



[ Reply to This | # ]