Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Why won't 10.8.2 allocate over 3.7 GB of VM?

I'm working with a Graphics heavy MMO -- It expects to be able to use over 4GM of memory.


My 27 inch iMac has 4GB of physical memory.


However, OSX page-faults every time the application wants more than 3.7 GB of memory.

Crashing the dispatch queue.


So far, the maximum number of Swapfiles I've "caught" is 6 for a total of 3 145 728 - 512 byte blocks.


ls -als /private/var/vm

total 3145728

0 drwxr-xr-x 9 root wheel 306 Oct 11 09:43 .

0 drwxr-xr-x 26 root wheel 884 Jul 28 17:43 ..

65536 -rw------- 1 root wheel 67108864 Oct 10 14:55 swapfile0

65536 -rw------- 1 root wheel 67108864 Oct 11 09:44 swapfile1

131072 -rw------- 1 root wheel 134217728 Oct 11 09:44 swapfile2

262144 -rw------- 1 root wheel 268435456 Oct 11 09:44 swapfile3

524288 -rw------- 1 root wheel 536870912 Oct 11 09:44 swapfile4

1048576 -rw------- 1 root wheel 1073741824 Oct 11 09:44 swapfile5

1048576 -rw------- 1 root wheel 1073741824 Oct 11 09:44 swapfile6


From the consistancy of the crashes, it's clearly an issue with Virtual Memory allocation.


What I'm looking for is any explanation of the VM system in Mountain Lion.

Everything I can find is ancient, at best it describes Snow Leopard or Lion, and I know that Memory Management has changed in Mountain Lion.

iMac, OS X Mountain Lion (10.8.2), iMac Core i7 2.93GHz 4GB

Posted on Oct 11, 2012 6:56 AM

Reply
7 replies

Oct 11, 2012 10:00 PM in response to BDAqua

The answer to "VM jumping up to more than the Fee Space on the Drive" is actually quite "simple."


Virtual Memory is not really what everyone thinks it is. Part of it is actually the application itself on disk. Another, and in most cases, the primary portion, is simply "allocated," but not used. And I put "Allocated" in quotes because it is not allocated in a physical sense on the disk, but in a table in memory.


Virtual Memory managemnt is a complex topic and for Mountain Lion, not documented. The Docs describing OSX virtual memory go back to Tiger for the most part. However, for Lion and Mountain Lion significant changes were made.


One of the things I was looking for was the answer to the question -- does OSX use "Eager Swap" or Lazy Swap" and what do those terms mean to OSX. One term means "allocate the disk space for swapping this App at Launch." The other means "don't allocate the disk space until it is needed to swap the app out."


Both are gross simplifications, but the basic idea.

Oct 11, 2012 10:06 PM in response to rkaufmann87

As for adding more physical ram -- that was the "red herring" in this situation. Since I had 4 GB of ram, it was obscuring the fact that it was a 32bit App, which can only address 4GB or memory!


If I had had 8 or 16 GB, the question would have been more obvious -- Why is this App only using 4 GB or ram when there is another 4 or 12 GB available? Which would have made the answer more obvious.

Why won't 10.8.2 allocate over 3.7 GB of VM?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.