Is this a bug? Python intermittently stops dead for seconds

Steve Holden steve at holdenweb.com
Sun Oct 1 12:13:19 EDT 2006


charlie strauss wrote:
> Steve, digging into the gc docs a bit more, I think the behaviour I am seeing is still not expected.  Namely, the program I offered has no obvious place where objects are deallocated.  The way GC is supposed to work is thate there are three levels of objects
> 
> level0:  newly created objects
> level1:  objects that survived 1 round of garbage collection
> level2:  objects that survivied 2+ rounds of gargbage collection
> 
> Since all of my numerous objects are level2 objects, and none of them are every deallocated, then I should never trip the GC for these.
> 
> Your explanation would require this to be tripped so I can't explain it.  For your explanation to be correct then there as to be some non-obvious step in the program that is deallocating level2 items in sufficient numbers to trip the GC.  
> 
So perhaps you can explain why switching garbage collection off changes 
program behaviour? If you read the documentation more carefully you will 
see that the collector merely scans generations 1 and 2 less frequently 
that generation 0.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb       http://holdenweb.blogspot.com
Recent Ramblings     http://del.icio.us/steve.holden



More information about the Python-list mailing list