[plt-scheme] precise GC example?

From: tom sgouros (tomfool at as220.org)
Date: Sat Dec 29 11:57:14 EST 2007

Chongkai Zhu <czhu at cs.utah.edu> wrote:

> All I can suggest now is to carefully read section 3 of inside
> mzscheme manual, especially "3.1.4 Guiding mzc --xform".

Thank you.  I've been reading that section as closely as I can, and yet
I still think my life would be easier if I could find an example of how
it's done.  Soon, of course, I'll have an example, but if I could learn
from someone else's experience, I'd have mine sooner.

Also, my question about testing is not answered in that section.  Do I
know that I've done it right if I get it to run once without segfaults?
Do I need to test it more than that to be certain it will always run
properly?  Any suggestions or advice there would be welcome.



> If you have more problem with particular piece of code, you can also
> post it here for help.
> Chongkai
> tom sgouros wrote:
> > Hello all:
> >
> > I'm in the process of converting some C code I used to extend an old
> > version of mzscheme into a dylib with which to extend an up-to-date
> > version.  I'm trying to teach the new code how to cooperate with the 3m
> > GC system, and it's pretty slow going, and I don't have high confidence
> > that I'm doing it right.
> >
> > I've already read in the list archives about a way to get around a
> > "suspicious arithmetic" error using the GC_CAN_IGNORE flag, so that's
> > one roadblock skirted, perhaps.
> >
> > I wonder, though, if anyone has a more elaborate example of the genre
> > to share than the one in collects/mzscheme/example.  I'd be particularly
> > grateful as well for an example that worked via the mzc --xform compile.
> >
> > I also wonder about testing.  With GC issues, I'm thinking that merely
> > working isn't a particularly good test.  How can I be sure that I've
> > done this correctly and that I'm not merely creating opportunities for
> > obscure failures at random times in the future?
> >
> > Many thanks in advance for any advice on these matters anyone would like
> > to offer.
> >
> > Happy Lang Syne to all of you.
> >
> >  -tom
> >
> >

 tomfool at as220 dot org

Posted on the users mailing list.