Page 1 of 1

Unable to allocate and lock memory

Posted: 3. Dec 2009, 11:41
by manavid
I have a MacPro with 12GB mem.

I was trying to install Windows 2003 with 3584 MB memory. During the installation I get the following error:

Code: Select all

...
00:01:09.664 PGM: Failed to procure handy pages; rc=VERR_NO_MEMORY rcAlloc=VERR_NO_MEMORY rcSeed=VINF_SUCCESS cHandyPages=0x10
00:01:09.664      cAllPages=0xe846f cPrivatePages=0xbbcf2 cSharedPages=0x0 cZeroPages=0x2c77d
00:01:09.665 PGM: Failed to procure handy pages; rc=VERR_NO_MEMORY rcAlloc=VERR_NO_MEMORY rcSeed=VINF_SUCCESS cHandyPages=0x10
00:01:09.665      cAllPages=0xe846f cPrivatePages=0xbbcf2 cSharedPages=0x0 cZeroPages=0x2c77d
00:01:09.665 VM: Raising runtime error 'HostMemoryLow' (fFlags=0x2)
00:01:09.665 Changing the VM state from 'RUNNING' to 'SUSPENDING'.
00:01:09.665 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'.
00:01:09.666 ERROR [COM]: aRC=NS_ERROR_INVALID_ARG (0x80070057) aIID={e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000} aComponent={Display} aText={Argument address is NULL} aWarning=false, preserve=true 
00:01:09.666 Console: VM runtime error: fatal=false, errorID=HostMemoryLow message="Unable to allocate and lock memory. The virtual machine will be paused. Please close applications to free up memory or close the VM"
I should note when the error occurred I had about ~7.5 GB free mem and ~3.5 GB wired.

Any suggestions?

Attached is the complete log file.

Cheers,

- Moe

Re: Unable to allocate and lock memory

Posted: 3. Dec 2009, 16:05
by lmj
Hi,

I'm getting the same thing. I'm running MacOSX Snow Leopard 10.6.2 on a early-2009 macpro with 16gb memory. My guest is Ubuntu 9.10 in 64 bit. The guest OS boots fine and is usable until I run a program that requests 2.6gb of memory.

--L

Re: Unable to allocate and lock memory

Posted: 7. Dec 2009, 14:54
by masonlee
I have a bug ticket filed for a similar sounding problem when running a guest with 3.5GB ram. Changing the guest ram to 3GB worked around the problem.

http://www.virtualbox.org/ticket/5649

Re: Unable to allocate and lock memory

Posted: 16. Mar 2010, 23:25
by buffyg
Any update on this? I'm seeing a version of this problem on an early 2008 Mac Pro with 12GB RAM running Mac OS X 10.5.8. Even with about twice as much memory free as what I'm trying to give the VM, I've been having problems getting VirtualBox to use even the full amount available to a 32-bit process and have updated your ticket with the details of the errors I'm seeing.

Re: Unable to allocate and lock memory

Posted: 7. Jun 2010, 21:13
by jj-
Same problem here. I am using VirtualBox 3.2.0 r61806 on a Macbook Pro OS X 10.6.3 with 8GB of RAM as host. Windows 2003 as guest. If I allocate 3584 MB of RAM, I get the "unable to allocate and lock memory" error mentioned here. If I lower the RAM (I randomly picked 2892 MB), then it works. I haven't try to figure out the exact threshold. I have verified in Activity Monitor that there is sufficient RAM available to run at 3584 MB.

Re: Unable to allocate and lock memory

Posted: 15. Jul 2010, 07:03
by tjm
Would love some feedback on this issue! I, too, am having this problem. I'm using VirtualBox 3.2.6 on Mac OS X 10.6.4 with Windows XP 64-bit guest. It seems to halt/pause right around 3gb of memory allocation.

Thanks for any help that can be given!

Re: Unable to allocate and lock memory

Posted: 15. Jul 2010, 07:58
by tjm
***SOLUTION***

Run your host OS in 64-bit mode! To do this: hold down '6' and '4' when booting up or right after restart. To go back to 32-bit: '3' and '2'. After some digging I found out that Mac OS X 10.6.x runs a 32-bit kernel by default... no wonder we couldn't allocate more than 3-4gb of memory! From what I understand about a 32-bit OS (kernel) is that it won't recognize more than 2gb of memory, I think. So, anyways, this makes sense now!

Thank you and good luck all!!!

Re: Unable to allocate and lock memory

Posted: 16. Jul 2010, 20:58
by Sasquatch
tjm wrote:From what I understand about a 32-bit OS (kernel) is that it won't recognize more than 2gb of memory, I think. So, anyways, this makes sense now!
A 32 bit OS can see 4 GB max, but due to some miscalculations in the past, the last 512 MB is reserved for hardware addresses, so you have 3,5 GB available tops. In some cases, you end up with 3.2 or even 3.0 GB.
But yeah, running in 32 bit mode isn't going to cut it if you're trying to allocate more than 4 GB RAM.

Re: Unable to allocate and lock memory

Posted: 12. Nov 2010, 17:31
by akj850
Has anyone found a workaround for this problem? I have a Mac Pro 2006 with 13G of memory. Apparently, the 64-bit kernel mode is not possible on this device and the highest I can reliably set my memory for a virtual machine is 1G, which is quite limiting.

I have updated to 3.2.10 and still have this problem.

Any help is appreciated!