This is the mail archive of the guile@sourceware.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: on the topic of GC.


On 19 Sep 1999, Jim Blandy wrote:

> > can someone with first hand experience dealing with precise GC from C
> > (i.e. Emacs, Elk etc.) tell me what exactly was the painful and
> > error-prone part?  in particular, was the need to register your
> > references with the GC painful in itself?
> 
> The problem was that people would always make mistakes in registering
> references.  They'd forget.  Or they'd leave out a registration
> because they knew GC "won't happen while this inner loop runs", but
> then someone else would add a hook somewhere, and suddenly GC would
> happen when it wasn't expected.
> 
> Remembering to register all your references isn't that hard.  But when
> you screw up, the bug can take hours to track down.  It may not show
> up for months.  Basically, imagine that every local variable is a
> potential heap corruption bug.  :)

Wouldn't it be possible to have a function scanning some region of memory
and looking for possible references that haven't been registered?  This
function would help debugging and could even be used to check heap areas:
Guile does require explicit registering for heap objects, so there is even
with the current approach a chance that you forget to register something.

Best regards,
Dirk Herrmann


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