I have a VM size of 350 GB.
The VM size does not actually reflect any resource in use, nor is it a limit. It is the sum of the address space sizes (ps -ax -O vsz
will show these) for all running processes. The address space size is simply the largest number being used by that process to refer to locations in memory; memory below that value may not even be allocated to any purpose.
Here's just one example of why there would be such gaps:
Multiple programs may use shared libraries of code (also sometimes known as frameworks), such as Cocoa. In order to efficiently start up a program, these shared libraries are arranged so that each library on your system (mostly) is at a different virtual address — this means that when the program is loaded, its code that refers to the library can already point to that address and does not need to be rewritten with different addresses (relocation or dynamic linking). But not every program uses every library, so there will be gaps.
(I'm not an expert on these matters; some specific details may be off. Consider the above a guide to the sort of complexity that can exist in a modern system, not exactly how it actually does work.)
I have 260 GB there, whoop whoop. – slhck – 2012-04-25T11:03:43.227
VMware Fusion sometimes has petabytes or exabytes of virtual memory on my system. – Daniel Beck – 2012-04-26T17:21:59.490