Re: Why does the garbage collector use a giant ring instead of lists?

Steve Dekorte <[email protected]>
Newsgroups gmane.comp.lang.io
Message-ID <[email protected]>
Good to hear. Might there be a way to use C++ smart pointers to make this easier to avoid?

On 2011-08-09 Tue, at 06:55 PM, dennisf486 wrote:

> Thanks for tip about the whitepaper.  I was trying to understand the Io garbage collector based on Dijkstra's original three color garbage collection paper, and getting rather confused at the parts of the algorithm that didn't match up.
> 
> By the way, in the end it turned out there was no bug in the GC after all (my original impetus for digging into the GC code).  The bug I had was that I was accidently creating the same C++ object twice (in an Io script).  Letting the original object slot get updated with the second instance allowed the first instance to become garbage, although the C++ half of my system still held a pointer to it.  It was fiendishly hard to debug because I didn't know until some careful pointer value inspection there were really two objects in play; what I thought I was observing was "object was marked" and "object gets collected" and both could not possibly be true at once for a single object.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.