[Python-Dev] GC Proposal

Antoine Pitrou solipsis at pitrou.net
Sat Jun 28 20:47:54 CEST 2008


Adam Olsen <rhamph <at> gmail.com> writes:
> 
> We need two counters: one is the total number of traceable objects
> (those we would inspect if we did a full collection) and a number of
> "pending" trace operations.  Every time an object is moved into the
> last generation, we increase "pending" by two - once for itself and
> once for an older object.  Once pending equals the total number of
> traceable objects we do a full collection (and reset "pending" to 0).

It sounds rather similar to Martin's proposal, except with different
coefficients and slightly different definitions (but the "total number
of traceable objects" should be roughly equal to the number of objects
in the oldest generation, and the "number of pending trace operations"
roughly equal to the number of survivor objects after a collection of
the middle generation).

Am I missing something?




More information about the Python-Dev mailing list