MacOS – What’s the difference between Real, Virtual, Shared, and Private Memory

activity-monitormacosmemory

The different columns in Activity Monitor are a little confusing

Best Answer

Taken from my answer at Server Fault:

Mac OS X Memory Jargon:

Wired : This refers to kernel code and such. Memory that should not ever be moved out of the RAM. Also know as resident memory.

Shared : Memory that is shared between two or more processes. Both processes would show this amount of memory so it can be a bit misleading as to how much memory is actually in use.

Real : This is the "real" memory usage for an application as reported by task_info() - a rough count of the number of physical pages that the current process has. (RSIZE)

Private : This is memory that a process is using solely on its own that is used in Resident memory. (RPRVT)

Virtual : The total amount of address space in the process that's mapped to anything - whether that's an arbitrarily large space for variables or anything - it does not equate to actual VM use. (VSIZE)

Active : Memory currently labelled as active and is used RAM.

Inactive : "Inactive memory is no longer being used and has been cached to disk. It will remain in RAM until another application needs the space. Leaving this information in RAM is to your advantage if you (or a client of your computer) come back to it later." - Mac OS X Help

Free : The amount of RAM actually available without any data.


The best documentation I know of (and have been able to find in followup research) is Apple's own Managing Memory article on their developer website.

Other worthwhile sources: Darwin-dev mailing list: [1], [2] and an old article on MacOSXHints. Additionally Mike Ash has posted a good layman's introduction on his blog