What does FreeMemory actually do?
There's a highly-rated app on the Mac App Store called FreeMemory. It claims to be able to "increase your free memory with a simple click." Although it's free right now, I believe it normally goes for 99 cents.
As a computer scientist, my intuition about the app is that it's almost certainly snake oil; in a modern operating system, anything the app could do would be unnecessary at best and actually harmful to performance at worst.
My best guess is that the app probably does something to cause the system to dump the "Inactive" memory, which probably has no effect whatsoever on performance. However, very little information is provided about the app, and I'm reluctant to install it on my machine. I'm also not as familiar with OS X as I am with Linux and Windows, so I could be mistaken about how OS X handles RAM.
My questions are:
- What exactly does FreeMemory do, and how does it accomplish it? Is there some public API that can give user-space programs access to the operating system's memory management parameters?
- Could using FreeMemory actually confer a performance boost, or is it snake oil as I suspect?
Absolutely nothing other than swindle people out of their money. Don't ask me why Apple approved it. iOS and OS X manage memory as required. A lot of FUD out there claiming it's poor at it. No evidence to support those claims. No facts ever presented. No one with a modicum of experience or education in the field has ever come up (that I've seen) and accredited the claims. Snake oil.
You want to improve performance? Buy a better device. Only better hardware can equate to better performance. You can of course optimize a system, but this doesn't do that, it only shifts available memory.
Here's a breakdown of how to understand memory management in OS X (courtesy of Apple):
Free memory
This is RAM that's not being used.
Wired memory
Information in this memory can't be moved to the hard disk, so it must stay in RAM. The amount of Wired memory depends on the applications you are using.
Active memory
This information is currently in memory, and has been recently used.
Inactive memory
This information in memory is not actively being used, but was recently used.
For example, if you've been using Mail and then quit it, the RAM that Mail was using is marked as Inactive memory. This Inactive memory is available for use by another application, just like Free memory. However, if you open Mail before its Inactive memory is used by a different application, Mail will open quicker because its Inactive memory is converted to Active memory, instead of loading Mail from the slower hard disk.
Now even with rudimentary understanding of memory management in Apple's OS, tell me if you think "freeing up" Inactive memory is of any use? It is available to any application that requests it and if the same application wants to grab a hold of it again, it gets a speed boost. It's of course not this simple, but razing Inactive memory and moving it to Free memory results in no increase in performance. After all, how could it? A good system should hoard all your memory and allocate it to things that need it. Free memory is wasted memory as it's, by definition, not being used. If you have 8 GB of RAM and keep 4 GB free at all times, then you have a system running 4 GB.
Inactive memory in OS X is allocated intelligently. I'll change my tune when I see valid and reliable data that claims otherwise. And honestly, if nothing else, do you think some third party app has found the holy grail of memory management that has eluded Apple's world class engineers all this time (not to mention the thousands of contributing open-source UNIX programmers)? Like I said, snake oil.
Installed and tested, they're running the purge command and freeing up inactive memory. It's not 100% snake oil, there can be situations where OS X doesn't properly release the inactive and starts hitting the disk based swap file (incurring an I/O performance hit), but it's fairly useless for the majority of users.
Although if they're making $0.99 for wrapping a command in a menu bar I really need to get my Mac Developer license.