Memory-cleaning utilities: Not the panacea they claim to be
Memory-cleaner programs may appear to free up system memory, but they usually don't do much to cure low system-memory problems.
There's no shortage of programs that promise to boost your computer's performance by clearing its memory. But think twice before taking their claims at face value.
is a fast, temporary workspace for active tasks. So if your computer begins to slow down, one of the first things you should check is whether your system is running out of memory.
The system continuously manages and optimizes memory by writing unused contents to disk. When you run low on memory, though, this process may encroach on active computing tasks, which will significantly slow them down.
So if your system begins to slow down, freeing up RAM can speed things up. The straightforward way to do this is to quit programs and close open files. But there are also a bunch of third-party memory-cleaning tools that claim to clean up your memory without all that bothersome mucking about--tools such as MemoryFree 2, iCleanMemory, FreeMemory, MemoryFreer, Memory Cleaner, Memory Cleaner Pro, MemoryScope, FreeMemory Pro, Flush Memory, and so on (there are many, available via Download.com or the Mac App Store).
These tools typically feature a relatively simple interface dominated by a button marked "Clean" or something similar. Click it and your system will slow down quite significantly for a few moments. Afterward, your Activity Monitor typically shows a larger green segment in its memory-usage pie chart. Problem solved!
Except, not really. While this technically means the system now has more free memory--which to most people suggests the system now has more memory to use--most of the time this is not the case.
In OS X, the system manages a program's RAM. When a program loads and performs its functions, it will ask the OS to reserve RAM space for active use--not all of which the program needs right away. As a result, there is room for the program to reduce its memory footprint and still work in a more constrained workspace if the demand for system memory increases.
Generally, as you load more programs, the system will write transfer more program data from RAM to the hard drive, thereby freeing up RAM for use elsewhere. Cleaner programs exploit this behavior. They typically start a routine that imposes a high RAM demand on the system, which forces the OS to signal other programs to free up memory and to write as much unused data as it can to the hard drive. After the cleaner program grabs as much memory as it can from the system, it then relinquishes the memory it's been using.
This process technically frees up RAM, but only in the sense that squeezing a sponge down on a flat surface frees up water-absorbing capability. Release the sponge, and it will slowly start soaking up the water again. Similarly, RAM that has been "squeezed" by a cleaner program will be free, but the programs rev back up, they'll start soaking it back up again.
So memory-freeing utilities are far from the panacea the claim to be. In most cases, you're probably better off either upgrading your system with more RAM, closing programs that use excessive amounts of memory, or updating buggy ones that are memory hogs (these programs can be found in Activity Monitor by sorting the process list by "Real Memory" used).
In some cases, these utilities can actually have a negative impact on system performance by clearing the contents of "inactive" RAM. If you open Activity Monitor you will see a blue segment of the memory pie chart that is labeled "inactive." This RAM still holds data, but isn't being used by any active process. If the system needs to load the data that is being stored in RAM, the all it needs to do is reactivate that memory instead of loading it from scratch.
As an example of this, if you restart your system to clear memory and then launch a program, the program may take a few seconds to load; however, if you then quit the program and relaunch it immediately it will likely load much faster. This is because the system kept the program's contents in memory even though it was inactive, and reloading the program had the system merely reactivate memory instead of loading it all from the hard drive. As a result of this, if you use a memory cleaning tool you will force the system to release all the inactive memory, and thereby require relaunched programs to potentially take longer to load.
Despite their shortcomings, memory-cleaning programs do have some advantages. For instance, they can help identify programs with suspected memory leaks. If for the most part your programs use a small amount of memory but one or two suddenly use a large amount of RAM and will not relinquish it, then one possibility is that the program may have a "memory leak." This is where RAM is continually reserved but never released by the program so its footprint grows and grows until there is no more RAM to use.
True memory leaks are sometimes hard to identify, but using a memory squeezing tool can help by showing what programs are releasing memory and what ones are not. If a program with progressively increasing RAM usage refuses to release memory even when the RAM cleaner utility is run, then the program might have a memory leak.