[plt-scheme] garbage collection questions

From: Dave Griffiths (dave at pawfal.org)
Date: Wed Feb 21 05:13:59 EST 2007

Hi all,

Some questions relating to (3m) garbage collection in mzscheme C/C++

In a function extension, does the argv argument have to be protected from
garbage collector in _every_ function which can result in a scheme

Following on from this, is there documentation on which scheme api
functions contain an allocation call? Is it safer to just protect all
Scheme_Object pointers in every function extension regardless?

And just to make sure - I'm assuming all memory allocated with the normal
malloc/new (inside the extension code, or in library code) is ignored by
the garbage collector.

Is there a way of running the garbage collector in a more deterministic
manner - ie, make it run in a slow "debug" mode, freeing all availible
memory at every opportunity (or is this what 3m does anyway) and then
making it possible to check (with valgrind or similar) for strangeness, as
a way of verifying extension code.

I also am having difficulty running tools like valgrind or gdb on recent
SVN versions of mzscheme.

Sorry for so many (probably v simple) questions, I'm learning slowly :)



Posted on the users mailing list.