Python memory usage

velotron joseph.sheedy at
Mon Nov 13 20:29:21 CET 2006

(hello group)

On Nov 9, 8:38 pm, "Klaas" <mike.kl... at> wrote:

> I was referring specifically to abominations like range(1000000)

However, there are plenty of valid reasons to allocate huge lists of
integers.   This issue has been worked on:

My understanding is that the patch allows most objects to be released
back to the OS, but can't help the problem for integers.  I could be
mistaken.  But on a clean Python 2.5:


The problem exists for floats too, so for a less contrived example:

x=[random.weibullvariate(7.0,2.0) for i in xrange(10000000)]

Both leave the Python process bloated in my environment.   Is this
problem a good candidate for the FAQ?


More information about the Python-list mailing list