I have a 13-inch MacBook Pro with Intel Core 2 Duo 2.4 GHz and 4 GB 1067 Mhz DDR3 RAM. Thanks to its 10h battery life, I usually do not shut it down. I just grab it and go.

However, I have to restart it every couple of days because of memory issues. After a restart, Activity Monitor reports 3GB free memory which is quite enough for me start a VirtualBox image with 2GB memory, which I need for work. With the remaining 1GB, I usually keep Mail and Chrome open all the time. After using it a couple of days, even though I quit all applications, Activity Monitor reports 2GB free memory which is not enough to start my VBox image anymore. Where did 1GB go? Looking at the open processes, there isn't a single process that I can blame.

I have recently upgraded to 10.6.7 and but I do not expect to see a difference. Does anyone have a similar issue? Is there a tool to compare current memory usage of processes with respect to their memory usage after a restart?

  • We had huge problems on one of our lab Mac Pros; it turns out it was Chrome, which runs many sub-processes, each of which doesn't look overwhelming, but all together was forcing terrible swapping. Switching to Opera with the same number of tabs open stopped the swapping. – The Tentacle Apr 3 '11 at 16:49

Try running "purge" from the command line (in Terminal.app).

  • Thanks, purging reduced most of the inactive memory and a little of active memory. Now, it is just down to 2.9GB after one day. I think I can live with that. – orcun Mar 29 '11 at 9:26
  • 1
    Most apps stay in memory even after you close them, so that if you re-open them later they can open quickly (without loading from disk again). This is the "inactive" memory. This makes sense in most cases for most users, but in some cases (like yours) it helps to tell the OS explicitly that you don't want that stuff in memory anymore. That's what "purge" does -- it converts inactive memory to free memory. – Mark E. Haase Mar 31 '11 at 15:05
  • This answer should be marked as THE ANSWER (in some wiki of sort) because it is hard to find "how to free inactive memory" via the google for example. Btw I just needed to free it too, like you the problem is caused by VirtualBox. Normally the inactive memory stays in reasonable limits but with VBox guest running it just won't go away. OS X just swaps like crazy (I have 8GB DDR3 in my MBP 13" and it's still able to put 5GB to swap, leave 20MB free for me, Safari tab switching lags for seconds and inactive memory happily stays at 3.9GB) :/ – Dalibor Filus Dec 8 '11 at 23:25

I haven't used VirtualBox recently, but likely its leaking memory and not freeing it properly. I had similar problems with I used it a couple of years ago, before i switched to Fusion. Parallels has the same memory-hemorrhaging issues.

The only other thing I can say to do is to go into activity monitor and sort your processes by "real memory" and see what is still chewing up a significant amount.

  • I quit VBox too. No single process has an excessive amount of memory usage, more than say 100MB. – orcun Mar 28 '11 at 17:47
  • What are your other numbers like? Free, Wired, Active, non-Active, etc. – peelman Mar 28 '11 at 18:15
  • It turns out most of it was inactive memory, which is released by purge as suggested by mehaase. Thanks, for your help. – orcun Mar 29 '11 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.