Sarah writes, "This morning when I woke up my Mac I got a message that my Startup Disk did not have enough memory to run applications. Good grief. How could this be?
I have a 750GB Solid State Drive, and its got 156.8GB free on it. Because I do run Menu Meters, could see that yes, the memory was all full (i.e. solid red in the menu bar icon). So... I quit all apps, restarted and all is well. But here's my question: How in the dickens could this happen?
Is this the result of some sort of 'Memory Leak' or other problem I should be aware of. If so, how do I diagnose the problem and prevent it from happening again?"
iStat Menus' shows you RAM usage
Great troubleshooting, Sarah! This is almost certainly a memory leak in one application or another. A memory leak refers to a situation when an application doesn't release RAM that it no longer needs, and instead just keeps asking for more. When an app uses more memory than you have RAM, it starts pushing into "swap space," also called, "virtual memory" — that means it starts using your hard disk to store the data it can't physically keep in RAM. With the way OS X manages swap (as files on your boot drive), this can very quickly fill up your disk.
The trick, of course, is to figure out which app it was that did this. This becomes quite difficult if you can't launch anything to help troubleshoot! Instead of MenuMeters I started using iStat Menus, and one difference is that iStat Menus has a little drop down from the Memory menu that shows you the top 5 memory-consuming apps. This will immediately tell you which one is the offender and doesn't require you to launch an app (though Activity Monitor will show you the same thing if you can launch it?). It may still mean you have to reboot to fix it if you can't easily quit the app, but at least you *know* which one it was and can troubleshoot further (or contact the developer).