This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: on the topic of GC.
- To: Jim Blandy <jimb at red-bean dot com>
- Subject: Re: on the topic of GC.
- From: Dirk Herrmann <dirk at ida dot ing dot tu-bs dot de>
- Date: Mon, 20 Sep 1999 08:49:32 +0200 (MEST)
- cc: Michael Livshin <mike at olan dot com>, guile at sourceware dot cygnus dot com
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