This is the old SliTaz forum - Please use the main forum.slitaz.org

[solved] - "could not allocate physical memory" error in wine, qemu, virtualbox
  • monzmonz February 2010
    Having done a complete system upgrade a few days ago, now none of my wine programs nor my large virtual machines will work, giving me error messages about not being able to allocate memory. I had no problems with these before the upgrade. The host machine has 2 GB of RAM.

    Wine gives this error and will not run at all:

    preloader: Warning: failed to reserve range 00110000-68000000
    wine: failed to initialize: /usr/lib/wine/ntdll.dll.so: failed to map segment from shared object: Cannot allocate memory

    Trying to run my Windows XP virtual machine in VirtualBox, it starts with the black XP boot-up screen, but then when i try to login, i get an error dialog-box with this message:

    Unable to allocate and lock memory. The virtual machine will be paused. Please close applications to free up memory or close the VM.

    with ErrorID: HostMemoryLow

    But i never had a problem with this machine before, with exactly the same configuration.

    Results in qemu are similar. I tried running my Windows XP qemu machine with varying amounts of memory, having varying degrees of success. It booted fine with RAM amounts up to 320 MB (but was extremely slow), but when i tried 336 MB, it seemed to boot to the desktop ok, but as soon as i tried to open Task Manager the whole machine aborted and i got a segmentation fault error. If i try to run a machine with a larger amount of RAM, i get this:

    "could not allocate physical memory".

  • monzmonz March 2010
    I found one way to solve the problem. Apparently a recent upgrade of SliTaz added these lines to /etc/profile:

    # Max 64M for programs (prevent memory leak crashs)
    ulimit -d 65536
    ulimit -m 65536
    ulimit -v 524288

    It was that last one that was causing the problems which i was having. So i commented it out and, voila, now my wine apps work again, and the old qemu virtual machines with lots of memory work too.

    Is there any potential for a problem running with this line commented out?
  • LineaLinea March 2010
    Hi monz

    Looking at the man page: http://ss64.com/bash/ulimit.html

    It just sets an upper limit for any virtual memory. But I'm guessing you can do that with VirtualBox/Qemu anyway?
  • monzmonz March 2010
    Yes. In both VirtualBox and Qemu you can specify exactly how much memory you want the virtual machine ("guest" operating system) to have, unless you just accept the rather low defaults (which i only do for older operating systems, because it makes modern ones run too slow). And it's always recommended that you use no more than half of the real RAM which is installed on your real machine, because that might mess up the real ("host") operating system.

    But we all know that SliTaz uses very little memory, so actually i might be able to experiment more with even larger amounts of virtual RAM, now that i have the virtual machines working again.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social