3 ms·
I don't know how macOS manages memory or reports its use, but how does the data having been swapped out change anything? If N pages of data of those processes h
by Delk 3y ago
I don't know how macOS manages memory or reports its use, but how does the data having been swapped out change anything? If N pages of data of those processes have been swapped out, that means those processes have allocated and used that many pages of memory (plus any that are actually in RAM). The OS heuristics just decided it wasn't worthwhile to keep those particular pages in RAM under current circumstances.
If the processes just allocated a lot of memory and never touched it, it might be reasonable to say they don't actually use it because the OS might never actually reserve any physical resources for it. (Happens a lot e.g. in Linux with memory overcommit allowed by default and some processes allocating dozens of gigabytes of virtual memory, most of which they never actually use.)
But would those pages then count towards swap use either? Only dirty pages end up in swap. Unless macOS counts allocated but untouched pages towards used swap as committed resources.
edit: better wording