Finding source of leaking active memory on Mac OS Lion

Posted by Tim Kemp on Super User See other posts from Super User or by Tim Kemp
Published on 2012-11-29T17:02:08Z Indexed on 2012/11/29 17:07 UTC
Read the original article Hit count: 370

Filed under:
|
|
|

My activity monitor shows 6GB of active RAM usage:

Activity monitor screenshot

Yet my Real Memory column shows nothing like that amount:

enter image description here

(There's another screenful below that, all smaller.)

Backing that up, the output from this command (which sums up memory usage of every running process):

ps -axm -o "rss,comm" | awk 'BEGIN { s=0;}; {s=s+$1;}; END { printf("%.2f GB\n", (s/1024.0/1024));}'

Gives 4.09GB, so it looks to me like 2GB has leaked. I see much wider ranges sometimes, perhaps 2 or 3GB from the ps command and as much as 7 or 8GB of Active usage reported by Activity Monitor.

I've tried quitting everything and logging my user out and back in again, but the Active usage is still far higher than the RAM reported by ps and by each process to Activity Monitor. This 2GB of active RAM is basically unrecoverable unless I reboot. Is there any way to a) detect what's leaking and b) get it back?

Thanks

© Super User or respective owner

Related posts about osx

Related posts about memory