[plt-scheme] precise GC example?
Matthew Flatt wrote:
> At Sat, 29 Dec 2007 10:39:41 -0700, Chongkai Zhu wrote:
>
>> For me, I use "mzc --xform" to do the job, and my code happen to (or, I
>> managed to make it) meet all the limitations described in section 3.1.3.
>> So I know I do it correctly.
>>
>> A rule I used: if the point is managed by Scheme (i.e., with
>> scheme_malloc), I use xform to deal with it. If the point is managed by
>> C/yourself (i.e. with malloc/free), I warp that part of the code with
>>
>> #ifdef MZ_PRECISE_GC
>> XFORM_START_SKIP;
>> #endif
>>
>> and
>>
>> #ifdef MZ_PRECISE_GC
>> XFORM_END_SKIP;
>> #endif
>>
>> Hope that helps.
>>
>
> It sounds like you have some example code that Tom might find helpful.
> I guess it's here?:
>
> http://www.cs.utah.edu/~czhu/SchemeLink/mrmathematica.plt
>
>
>
Yes. I used to have some other code that register pointers by hand
(using MZ_GC_REG / MZ_GC_UNREG), but that's painful. Using xform is better.
Chongkai
> Matthew
>
>