in reply to Running out of address space?

The Python link you mentioned provides some useful information on this error. Your program may have a memory leak or a bug or it may genuinely need more memory than you have available. It's hard to tell from your description.

To solve the former problem you'll need to do some debugging. If you're convinced your program genuinely needs more memory than you have, you'll need to find a more powerful machine. In particular, upgrading to a 64-bit OS (with a 64-bit Perl) will eliminate the 32-bit 4 GB address space limitation. Which version of OS X and Perl are you using and how much physical memory do you have on your machine? Though virtual memory on a 64-bit OS, if properly configured, should allow your program to allocate vast amounts of memory, it will run very slowly if you don't have sufficient physical memory.

Replies are listed 'Best First'.
Re^2: Running out of address space? (VM)
by tye (Sage) on Sep 29, 2010 at 18:34 UTC

    http://old.nabble.com/malloc-%28error-code%3D12%29-td21596897.html includes the following:

    You may have run out of swap space, but that is unlikely.

    The most likely cause is that you have run out of address space.

    But they don't give any explanation for that conclusion. My experience is that it is much more likely to run out of swap space than to run out of address space. You can have a ton of little things that add up to taking up all available swap space. To run out of address space, the single process has to exceed something close to 4GB.

    A 64-bit OS will allow allocation of huge amounts of VM (via malloc) only if you have sufficient free swap space to back the allocated pages.

    It appears that OS X just dynamically resizes swap space so "running out of swap space" probably means "running out of disk space" (at least on the partition that contains the swap directory, which might default to /private/var/vm).

    It would be useful to use something like 'top' to watch the size of the process in order to determine how big it is really getting before it fails, instead of just guessing.

    - tye