Diagnose processes and resources
Interpret memory pressure
Use system memory pressure, swap, and process growth instead of treating low free memory as proof of a leak.
10 minute lesson
macOS uses available memory for caches. Low free memory alone is normal — unused RAM is wasted RAM, so the system fills it with recently used files and gives it back the moment an app needs it. That is why “only 200 MB free” is not, by itself, a problem.
Memory Pressure summarizes whether the system can satisfy demand efficiently. Activity Monitor’s Memory tab shows it as a graph: green means comfortable, yellow means the system is compressing memory to keep up, red means it is struggling and swapping heavily. The Swap Used figure next to it tells you how much has been pushed to disk.
Inspect system and process evidence
memory_pressure
Skip to the last line: System-wide memory free percentage: 68%. That single number is the CLI equivalent of the pressure graph.
vm_stat
Read three counters: Pages free, Pageouts (memory written to swap — a steadily climbing value under load is real pressure), and Pages occupied by compressor (how much the system is compressing to avoid swapping).
Then rank processes by resident memory:
ps -axo pid,rss,%mem,etime,command | sort -nrk2 | head
rss is resident memory in kilobytes. Note the top entries together with etime, because size only means something relative to how long the process has run and what it was doing.
A leak is a trend, not a reading
Compare the same workload over time. Run the suspect app through the same task today and an hour from now, and record rss each time. A leak is sustained unexplained growth connected to a process and reproduction, not one large reading. A browser using 6 GB with forty tabs open is doing its job.
The classic mistake is the opposite reflex: seeing yellow pressure once and force-quitting everything, or installing a “memory cleaner”. You lose the evidence and the trend, which were the only things that could have told you whether a real leak existed.
Lesson completed