how to explain this memory usage

Neil Schemenauer nas at python.ca
Fri Apr 27 14:19:58 EDT 2001


Andrew Kuchling wrote:
> This is also dependent on your platform's malloc.

Its more complex than that.  The interpreter maintains numerous
freelists.  Try creating a list like this:

    l = range(1000000)

The memory allocated for those integers is never freed.  On any
real OS it doesn't matter though.  You are only using address and
VM swap space.

  Neil




More information about the Python-list mailing list