I've got Snow Leopard and 8G of RAM. Activity Monitor reports a VM size of 173 *Giga*bytes. My hard disk is only 250G and 200G of that is in use. I've got a lot more data than 27 GB on my hard disk. So the virtual memory size cannot really be 173GB, surely?
Virtual memory is not completely occupied all the time. Your mac probably has set maximum limit for virtual memory to 173 GB.
That does not mean all 173 GB memory has been allocated. It will be allocated as per requirement.
I don't think more than 8 GB of it will ever be allocated unless you use some insanely RAM hungry application.
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 (
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.)