MacOS – Huge memory leak in Mountain Lion

macbook promacosmemory

I recently bought a MacBook Pro Intel Core i7 with 8GB DDR3.

By monitoring with htop I notice that my RAM usage sometimes goes up to 7GB, with only Google Chrome, a few iTerms a text editor and app store.

After running $ purge my RAM usage goes back to 2GB. I found myself typing this command multiple times a day.

htop doesn't seems to show the reason, as the application that most memory consumes it's App Store, with only 3%.

I read a few posts about this and that's where I found the purge solution, but is there a better approach?

Will the Mavericks update fix this?

Best Answer

Any memory usage that you can get rid of with purge is, by definition, not a leak.

OS X has always tended to use memory for its disk cache, and newer version have become fairly good at keeping memory busy with caching when not used actively by programs. When a program uses that memory for computation, the amount used for the disk cache is used correspondingly.

Why do you think it’s bad that your memory is used? Unless you’re seeing performance degradation, it tends to be a feature to effectively use your installed RAM.

ETA: What @zigg said above.