How to virtual memory be greater than the total available space

activity-monitormemorysnow leopardvirtual-memory

Why does my MBP sometimes report VM Size: 300+ GB in Activity Monitor under System Memory tab, when my hard disk size is only 250 GB (total) and RAM is 4GB? I know it can't magically get that extra space, but what is it trying to tell me?

Best Answer

It's all imaginary since virtual memory doesn’t need to exist until a program stores something specific. In this case, some combination of programs is saying to the OS they might some day use that much space. Don't worry unless:

  • the swap space grows past your ram size
  • active + wired ram is greater than 75% of physical RAM. (3GB in your case)

Basically, this idea makes memory handling faster as the system is running. Since programs keep asking for more and more memory, the system lays out un-mapped chunks of virtual RAM with tons of space in between each process' allocation. This makes some very common memory calculations easier and faster and makes it very unlikely that the regions will ever overlap. When virtual memory regions overlap, it's more costly to pause things and re-map the memory under a running program. All this mental olympics involving virtual memory makes your mac run faster.