This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: SCM_DEBUG_FREELIST
- To: Dirk Herrmann <dirk at ida dot ing dot tu-bs dot de>
- Subject: Re: SCM_DEBUG_FREELIST
- From: Michael Livshin <mlivshin at bigfoot dot com>
- Date: 22 Jun 2000 13:43:39 +0200
- Cc: Guile Mailing List <guile at sourceware dot cygnus dot com>
- Organization: who? me?
- References: <Pine.LNX.4.21.0006221321050.10395-100000@marvin.ida.ing.tu-bs.de>
[ aside: I believe we really really need a separate public development
list. ]
Dirk Herrmann <dirk@ida.ing.tu-bs.de> writes:
> I am about to do some mindless work. This time, I'd like to rename the
> debugging macros according to the SCM_DEBUG_ naming scheme. Thus, I have
> some questions about GUILE_DEBUG_FREELIST:
>
> * If this macro is enabled, with every new cell the list of free cells is
> checked whether it contains cells that are not of the free-cell type.
> Is this right, or is there anything else about this macro which I am
> missing?
what is supposed to happen on every call to newcell with
GUILE_DEBUG_FREELIST defined is this:
0) free list is checked for any suspicious entries.
1) full GC is performed.
2) [implicit] at the end of the GC sweep phase the freelist check is
performed again.
the actual situation is worse, because after the GC changes (freelist
clustering, namely), the checks are not very useful -- the pre-GC
check only scans one cluster (at most), and the post-GC check doesn't
scan anything at all. (my local tree has the fixes, but I'm sitting
on it for now, for various uninteresting reasons).
> * What are the errors that are supposed to be found with this debugging
> option? I. e. in which way may it help developers of guile or
> extensions to guile? To me it seems that it can mostly be used to
> detect heap corruption, maybe also to find errors in the garbage
> collector. Or is there more to it?
yes. it should be used to detect unsufficient GC protection in user
programs (the C-written ones).
--
I am not a Church numeral!
I am a free variable!