Python C API String Memory Consumption
Carl Banks
pavlovevidence at gmail.com
Fri Apr 10 05:47:32 EDT 2009
On Apr 9, 11:23 pm, Hrvoje Niksic <hnik... at xemacs.org> wrote:
> a... at pythoncraft.com (Aahz) writes:
> > BTW, note that if you're using Python 2.x, range(1000000) will cause
> > a "leak" because ints are never freed. Instead, use xrange().
>
> Note that using xrange() won't help with that particular problem.
I think it will because with xrange the integers will not all have to
exist at one time, so Python doesn't have to increase the size of the
integer pool to a million.
Carl Banks
More information about the Python-list
mailing list