[Python-3000] Free list for small longs

Christian Heimes lists at cheimes.de
Wed Feb 6 22:35:28 CET 2008


Martin v. Löwis wrote:
> I wonder whether such a thing should run as a side effect of a full 
> garbage collection, also. GC has a chance to free up arenas for good,
> and allocated-but-unused blocks on arenas prevent Python from returning
> them to the OS.

Under which condition does a full garbage collection take place? Does
the interpreter run a full gc once in a while or is it started by
gc.collect()?

I'm more concerned about the int and float memory blocks. They should
get freed when more than a couple of hundred blocks are allocated. The
other free lists are much smaller. But memory fragmentation is an issue
for them, too.

Christian



More information about the Python-3000 mailing list