[PLT announcement] Re: [plt-scheme] PLT Scheme v370

From: Eli Barzilay (eli at barzilay.org)
Date: Fri May 25 04:12:55 EDT 2007

On May 25, Hans Oesterholt-Dijkema wrote:
> I don't really care if the memory of a scheme object gets moved,
> if the GC also updates the pointers to this memory.

In general, you should be careful with any C code that may keep a
reference to something.  For example -- say that you allocate pull a C
string out of a Scheme bytes object, and pass the pointer to a C
function.  As long as the call is active, no GC will happen and things
are fine -- but if the C code will keep a reference to that string and
then return, then at some point in the future, the string may have
been moved.

> Will the GC do that (for all possible pointers)?

If you use it properly (compile through mzc), then yes.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the announce mailing list.