hard memory limits

John Roth newsgroups at jhrothjr.com
Sat May 7 10:13:56 EDT 2005


"Maurice LING" <mauriceling at acm.org> wrote in message 
news:d5f9jl$k6d$1 at domitilla.aioe.org...
> Hi,
>
> I think I've hit a system limit in python when I try to construct a list 
> of 200,000 elements. My error is
>
> malloc: vm_allocate (size = 2400256) failed......
>
> Just wondering is this specific to my system or what? Will adding more RAM 
> helps in this case?
>
> Thanks and cheers
> Maurice

malloc (which is the memory manager Python uses when it
runs out of its own heap memory) is trying to get another
2.4 megabyte block of memory from the operating system
so it can expand the heap.

The operating system is refusing to fill the request. There are
a lot of reasons why this might happen, ranging from system
limits (too little swap space, too little real memory), to an
inability to find a 2.4 meg block in the user part of the
address space, etc.

I'd check swap space, and then balance redesigning the
application to not try to get large blocks of memory with
spending money on more hardware memory that might not
solve the problem.

John Roth







More information about the Python-list mailing list