Activity Monitor – How is the Memory Column Calculated?

activity-monitormemory

How is the per-process "Memory" column calculated in Activity Monitor? The name is quite vague and I haven't found anyone say anything about it aside from stuff like, e.g., "Memory used in RAM." I can't quite tell the relation between it and real memory, shared memory, private memory, dirty memory, etc.

FYI, I'm talking about this column:

Memory column

Best Answer

The Memory column is overall memory consumption, excluding compression, etc. going on. The Compressed Mem column is how much memory is being saved by the operating system's memory compression algorithm. The Real Mem column essentially shows Memory - Compressed Mem to give you an idea of how much actual memory is being consumed by the process. Private Mem shows you how much memory is being consumed by this particular process that is not being shared by any other processes and of course then Shared Mem would be what's being shared with other processes.

As far as actually tracking the memory consumption itself, I would have to dig a bit more into the developer documentation as I don't know off the top of my head how Xnu/Darwin tracks memory consumption on a per process basis to actually report such figures.

Please let me know if you're looking for any additional details or clarification as your previous question is slightly vague with regards to whether you're seeking specific acquisition details or just what the columns mean...