Re: A non-sucking garbage collector
"Mark Hahn" <[email protected]> Sun, 18 Jul 2004 09:58:25 -0700
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
FYI: By using a copying garbage collector, which Lieberman recommends for prototype based systems in his paper anyway, I can get the overhead for my scheme down to zero, both in terms of memory and time. A copying garbage collector does a pass much like a mark pass but copies the objects it finds immediately into a new memory area packing them tightly as it goes. When it is finished it just deallocates the old memory area totally. My new scheme just does the copying from the write-lock routine also. Obviously any object being written to is reachable, so it would have been copied when the GC got to it anyway. So my new scheme is now zero-overhead and uses the Lieberman-recommended type of GC. It is also much simpler to implement than most I have been looking at. I'm a very happy puppy.