Noam Raphael wrote:
> I checked - when doing the same thing with lists, all the memory was
> released for use by other Python objects, and most of it was released
> for use by the operating system.

In this specific case, perhaps. malloc will typically return memory to
the system only if that memory is at the end of the heap. If there
is more memory after block to be released, it can't return the memory
block, because it won't punch a whole into the heap.

So as soon as you have more than one object, things become interesting.

Different systems use different, enhance strategies, of course. For
example, Linux glibc malloc will allocate "large" blocks through
mmap (instead of sbrk), such blocks then can be returned individually.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to