[Baypiggies] json using huge memory footprint and not releasing

Jason Lai jason.lai at gmail.com
Sat Jun 16 00:49:55 CEST 2012


On Fri, Jun 15, 2012 at 3:10 PM, David Lawrence <david at bitcasa.com> wrote:

> On Fri, Jun 15, 2012 at 3:06 PM, Nam Nguyen <bitsink at gmail.com> wrote:
>
>> If I recall correctly, CPython memory management does not free memory.
>> Once it has allocated a slab, it will not release that slab. The
>> garbage collector makes room for CPython allocated objects in all the
>> heap spaces that CPython allocated.
>> Nam
>
>
>
> Lots of people have raised this idea in my hunt for answers.  However,
> releasing memory to the OS appears to be objects dependent.  I assume this
> is because different types use different memory allocators. Does anyone
> have a deeper understanding of this?
>


Python 2.5 should return memory to the C allocator (malloc), although
depending on the system the allocator may or may not return the memory to
the rest of the OS. There's this article on the topic, although I'm not
sure how current it is:

http://effbot.org/pyfaq/why-doesnt-python-release-the-memory-when-i-delete-a-large-object.htm


- Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20120615/e03bd8b4/attachment.html>


More information about the Baypiggies mailing list