gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: lisp and gc


From: Bruno Haible
Subject: [Gcl-devel] Re: lisp and gc
Date: Wed, 30 Jan 2002 17:48:51 +0100 (CET)

Greetings,

Glad to see that GCL is maintained again.

> So I was wondering if I could ask your advise as to the best method to
> debug lisp gc.

First, I'd write down the rules according to which the GC
works. (Which memory areas does it scan? What about alignment? Is
bit-fiddling in the least significant three bits of pointers allowed?
etc.).

Then I'd write several consistency checks. I'd insert calls to them at
various points (like beginning of GC, end of GC, end of memory
allocation of single objects). Of course make them optional, depending
on a compilation flag.

If you are suspecting kernel problems affect the sgbc (like the
eternal NetBSD mmap bugs), then it's wise to have two versions of the
GC, one which uses the advanced OS features and one which doesn't.

> I'm in the process of extracting the built in gc and
> linking in the Boehm collector as a compile-time option toward this
> end.

Now that the Boehm collector is guaranteed to be well maintained
(because it is the foundation of GCC and GCJ), that seems like a good
idea.

Another possibility is to write to a log file each memory allocation
event and each GC action and then have a processing tool for this kind
of huge log file.

> gdb watchpoints and breakpoints can actually change the
> location and/or result of the error, or even eliminate it entirely.  

Smells like uninitialized variables.

Btw, the alias for "bug-gcl" in fencepost.gnu.org:/com/mailer/aliases
is still pointing to a black hole.

Bruno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]