[Python-ideas] cross platform memory usage high water mark for improved gc?

Christian Heimes lists at cheimes.de
Tue Mar 11 20:57:02 CET 2008


Aaron Watters wrote:
> It would be nice if the threshold would adjust based
> on the performance characteristics of the app.
> In particular it'd be nice if the garbage collector would
> notice when it's never finding anything and wait longer
> everytime it finds nothing for the next collection attempt.

Have you read the code and comments in Modules/gcmodule.c? The cyclic GC
has three generations. A gc sweep for the highest generation is started
every 70,000 instructions. You can tune the levels for the generations
yourself through the gc module set threshold function.

Christian




More information about the Python-ideas mailing list