This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: tools to make non-conservative GC feasible.


hjstein@bfr.co.il (Harvey J. Stein) writes:

> "Marisha Ray & Neil Jerram" <mpriz@dircon.co.uk> writes:
> 
>  > This sounds scary, but I think that's probably because I don't quite
>  > understand the issue.  Is it that garbage can be incorrectly retained when a
>  > program includes pointer-like values, or that live objects can be
>  > incorrectly garbaged?  If the former, how could anyone die because of it?
> 
> It's the former, and in bad cases it could lead to memory exhaused, so
> at least the program could die.  The system could die depending on how
> it handles overcommitment of memory.  I suppose someone could die if
> said system was controlling their respirator.

Of course, the same can be said of a program that used explicit
allocation/deallocation or registration of roots, where it was messed
in one out of the way place that didn't show up until someone
croaked. I think that we can expect anyone writing respirator control
software (or anything where one of the program variables represent the
lives of living things) with conservative gc to know of the issues
involved, to avoid writing code that is at a high risk to trigger the
worst case behaviour, and to have a very robust recovery method. Given
that most people avoid heavily non-tail-recursive code, and that large
amounts of program state are generally not kept on the stack, the
worst case seems to be confined to programs designed to exploit it's
weaknesses, and to use that as a measuring stick for conservative gc
is unfair, since it's not that hard to break anything if you're
determined ;). 

Personally, I'd rely more on the highly unlikely case of the
conservative gc breaking, than the quite likely case of a programmer
screwing up explicit marking (much like malloc/free, etc, this is as
close to menial labour as you can get... it's not the least bit
interesting, and will end up screwing you in all kinds of marvelous
ways).

-- 
Greg