News for hackers. Stuff that matters.
Re:How the Boehm Garbage Collector Works by vilda on Friday February 10, 2012 @05:07PM (#3577688)
Neither in the article nor it the paper they mention cycles in references. Does it solve it in any way?
Re:How the Boehm Garbage Collector Works by chrisb on Friday February 10, 2012 @06:19PM (#3577941)
Garbage collectors have no problem with reference cycles.

A GC works by finding all objects that are reachable (referenced by some other object or a root), then discarding all other objects. So a cyclic data structure is completely discarded as soon as there are no live references to any of its objects.

As usual, Wikipedia has lots more information: http://en.wikipedia.org/wiki/Garbage_collection_(computer_sc...

GC roots are generally things like: static/global variables, active stack frames (function parameters and local variable), CPU registers.

Re:How the Boehm Garbage Collector Works by rayiner on Friday February 10, 2012 @06:19PM (#3577942)
BDW GC is a tracing collector. It doesn't need to have any special handle of cycles--either a cycle is reachable from the root set, in which case it is marked and considered alive, or it is not, and is never even seen by the collector before being reclaimed.