[Python-Dev] Object free lists

Eric Huss ehuss at ironport.com
Tue Jun 15 22:35:26 EDT 2004


Is there a plan to switch the basic objects (int, float, method, etc.) to
use pymalloc instead of the block allocation technique they currently use?

The reason I ask is because the free_list in these objects is unbounded.
It becomes a problem in a server environment if activity spikes cause
different types of objects to start eating memory and never give it up.

The only problem I see with using pymalloc is that the objects won't be
stored in memory in such a compact way.  I would imagine there would be no
performance difference.

Of course some optimizations (such as small_ints) would stay.

I would be willing to submit a patch with the change if there is interest.

-Eric



More information about the Python-Dev mailing list