Why is "Real Memory" greater than "Memory" for kernel_task process?

What exactly does Activity Monitor's Memory column mean?

How come in the example situation below (from a macOS High Sierra system) the Real Mem column is greater than the Memory column?

According to a previous question How is the "Memory" column calculated in Activity Monitor?, one might expect that Real Mem should always be less than or equal to Memory, which apparently is not always true.

Activity Monitor

Edit: This behavior is not only applicable for the kernel task but also to other processes. For example, in the screenshot below we see a couple Google Chrome Helpers experiencing the same behavior, where Real Mem > Memory. The same can be seen with Dock, Notes, Spotlight, Facetime.

enter image description here


Solution 1:

The kernel is special - it's the micro system that actually allocates memory and runs the virtual memory. You can just assume 3.60 GB is what your kernel has claimed and that 1.86 GB of that corresponds to what the task itself needs and the rest is the overhead / allocations to support all the demands made on the Mach kernel.

Every other line in Activity monitor behaves as one might expect, adding up fairly clearly once you ignore the kernel numbers:

  • Total virtual memory allocation is always the largest. Most of that is unallocated / not mapped physically and not in any category listed.
  • Real Mem is the non-shared and non-compressed allocation to that task.
  • Compressed Memory is the part of the total memory that has been compressed before being actively stored.
  • Private and Shared are both real memory usage but indicate if other processes might also need or be responsible for that allocation against the total.

For a larger discussion of the kernel_task, this question has some great links and discussion of how kernel_task is so very different than the rest of the processes you see on macOS.

  • What exactly does kernel_task do?