Re: Re: Re: Re: my garbage collector sucks

Greg Ewing <[email protected]>
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
Mark Hahn <[email protected]>:

> I put in code to mark objects not only in the mark phase but when
> new objects are created, when objects are touched or modified and I
> think when objects are being pointed to and the pointers are mucked
> with.

If you have to set the marked bit of an object whenever any reference
to it is stored anywhere, seems to me this has almost as much
complexity and overhead as reference counting -- and is just as
bad for the CPU cache.

Also, that only takes care of the directly referenced object. What about
other objects referenced by that object?

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
[email protected]	   +--------------------------------------+
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.