Mail Archives: djgpp/1996/12/26/21:53:29
Alaric B. Williams wrote:
>> Yup, but sadly I don't have the URL for it anymore :-)
I read about a C/C++ garbage collector in a BYTE magasine.It(the GC) was
availeble from the BYTE web site.I don't know if it is there anymore coz
the BYTE I read is kinda old(1 year or so)...Maybe if they have
archives...?
>> Tada! It's called conservative GC because if anything - maybe not
>> even a pointer - seems to refer to a block, it stays. Therefore, some
>> blocks hang around longer than they need to. But we've got to be real
>> sure in a non-typesafe C program.
The GC I read about had the same problem:anything that had a pointer to
itself stayed,so a circular list really busted the GC :
........
void *a,*b,*c;
a=&b;
b=&c;
c=&a;
......
at this point,even if the three pointers aren't used anymore they stay
because each of them is being pointed at(a circular list).
--
tudor 'at' cam 'dot' org
http://www.cam.org/~tudor
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d-(--) s(-):(+) a? C+ UL>++++ P L>+++++ E- W++ N o K---(----) w---
O---- M-- V-? PS+++ PE Y PGP t+ 5-- X+++>++++ R tv b+ DI D+ G e->++
h>++ r- y>+++++
------END GEEK CODE BLOCK------
- Raw text -