What is virtual memory on a Mac?
Last reviewed: 19 November 2026.
Virtual memory is the system that gives every process its own large private range of memory addresses, and maps those addresses onto RAM, compressed memory, files on disk or swap as needed. A process's virtual memory size counts every address it has reserved, not the RAM it uses, so it is often many gigabytes larger than the Mac's installed memory. That figure is normal and is not a sign of a problem.
Where do you see virtual memory size?
In Activity Monitor, double-click a process and click the Memory tab of the window that opens. Virtual Memory Size is listed with Real Memory Size, Shared Memory Size and Private Memory Size.
In Terminal, ps shows it in the vsz column (virtual size in kilobytes), and top shows a VSIZE column per process and a VM: line with the total for the whole Mac.
ps -o pid,vsz,rss,comm -p 1234 # 1234 is an example PID
top -l 1 -n 0 | grep VM:
Why is virtual memory so much larger than RAM?
A 64-bit process has an enormous address range, and reserving part of it costs nothing until data is written there. Programs reserve space for thread stacks, memory allocators and graphics buffers in advance, and every process maps the system's shared libraries into its address space, although those libraries exist in RAM only once.
On a Mac with Apple silicon running macOS 26, ps shows even a Terminal shell with a virtual size in the hundreds of gigabytes while its resident memory is a few megabytes. The total on top's VM: line adds up every process, so it reads in terabytes.
How does virtual memory decide where data lives?
Memory is handled in pages, 16 KB each on Apple silicon (vm_stat prints the size). For each page a process touches, macOS keeps it in one of a few places:
- In RAM, where it is counted in the process's resident memory.
- In the compressor, still in RAM but squeezed. See compressed memory.
- On disk in a file the page came from, such as an app's code, which can be read again when needed. See page-ins and page-outs.
- In the swap files in /System/Volumes/VM, when RAM and compression are not enough.
Which memory figure should you watch instead?
For a single process, the Memory column on Activity Monitor's Memory tab, or the physical footprint in Terminal. For the whole Mac, the Memory Pressure graph and Swap Used. Virtual memory size is useful only to developers looking at how a program lays out its address space.
How can Thrum help?
Thrum's Memory tab shows memory pressure, swap, and the eight processes using the most memory. An optional alert tells you when memory pressure turns critical.
Thrum is $4.99 once with a 14-day free trial and no account. It requires macOS 26 Tahoe on Apple silicon or Intel.
Questions
Can I change the virtual memory size on a Mac?
No. Unlike Windows, macOS has no setting for a page file size; it creates and removes swap files as needed.
Is swap the same as virtual memory?
Swap is one part of it: the disk space virtual memory uses when RAM is short. Virtual memory also covers RAM, compression and pages backed by ordinary files.
Sources
- ps(1), top(1) and vm_stat(1) man pages: run man ps in Terminal
- Apple Developer: iOS Memory Deep Dive (WWDC18), on pages, dirty, clean and compressed memory