7
5
I'm using a recent MacBook Pro with 8 GB of RAM and after a few hours of using it at work I notice the amount of 'active' memory growing and growing.
Whenever I reboot my Mac, everything looks fine and it is hardly using any RAM. But after a few hours it looks like this:
As you can see, in this case it's about 4.3 GB.
Being a developer, I know that 'active memory' is the amount of memory that is currently used by running processes. So the first thing I did was quitting all applications and killing all processes that don't seem to belong to Mac OS X.
After I did that, my active memory came down about 400 MB, but got stuck at what you see in the screenshot. There are no more processes or applications to quit.
Now I'm wondering what is actually holding on to the memory? top
and Activity Monitor don't report any processes with a high memory usage.
Any ideas?
Thanks!
Update 1:
Thanks to Doug Harris' answer I made this screenshot. It shows an active memory usage of 2.55 GB system wide, but only a 1.55 GB memory usage which the ps
command calculates.
I'm not sure where the rest of the 2.55 GB is gone or where it is allocated. I have Instruments installed, but since this does happen over a span of a few hours, it is difficult to use Instruments. This feels like a memory leak somewhere in the OS. Maybe a driver (although I don't have any kernel extensions installed - checked with kextstat
).
Personally I think it would be interesting to be able to see "more" about the memory management status. Under Linux there is some information under "/proc" available, afaik.
you can use instruments to detect memory leaks and to record the complete monitoring. so why is it difficult exactly to use it? – matthias krull – 2011-02-13T12:35:44.263
Because the leaks happen over a couple of hours. I'm not even sure which process to monitor, since the memory is just gone. Using Instruments to find leaks pulls a lot of CPU and memory to do the recording, which is not good for monitoring a over a long period of time. – BastiBen – 2011-02-13T12:41:02.197