Re: GC Problems with Guile-iii used as libguile.a

Tom Lord (lord@cygnus.com)
Mon, 21 Aug 1995 14:55:21 -0700

From: Christopher Lee <chrislee@GS157.SP.CS.CMU.EDU>

[....]

The problem is that my matrices are no longer garbage collected
enough. If I give the system enough heap-space, my application will
crash with 30Mb core files. My application cannot now be used for
research.

Can anyone tell me what causes this and how to correct it before I
give up and port back to guile-ii for now?

-Chris

I did a quick check to see if gscm objects are being garbage collected
at all. They are. So, it is not certain that you are facing a bug in
libguile. It may simply be that your code is now saving references to
some matricies, and so therfore causing them to not be collected.
Are any of your matricies being properly collected? Create one but
don't save it in a variable; is the free routine eventually called?

If some of your matricies are being collected, and some aren't, the
thing to do is to answer the question of why some aren't. If it isn't
obvious why from looking at the code, I would consider making a
debuging tool, derived form the garbage collector code, that can tell
you which GC roots are protecting matrices, and perhaps report the chain
of references involved.

If none of the matrices is ever collected, and if the matrix allocator
isn't storing away a reference somewhere that prevents collection,
then I think it would be helpful if you could boil the relevant code
down to a small test case because I can't imagine what could be causing
such a problem.

-t