[plt-scheme] Mobile objects

From: Jim Blandy (jimb at red-bean.com)
Date: Mon Feb 12 20:05:19 EST 2007

For what it's worth:

GNU Emacs uses a C/collector interface much like the 3m interface.  We
had ongoing problems with people 'knowing' that a collection would not
occur in a certain block of code, and not bothering to register their
temporary variables.  Later changes would then add innocent-looking
function calls which would break the assumptions made earlier.  In
practice, people found it hard to work with rules like "The 3m
collector needs to know the address of every local or temporary
pointer within a function call at any point when a collection can be
triggered."

(Emacs has since switched to a conservative scanner, but they still
have the MZ_GC_VAR_IN_REG-style declarations in place, with the
ability to check the conservative against the precise, and so forth.)

If one wanted to allow collections to be triggered by a thread while
other threads run C code, the 3m interface would not be adequate; but
I gather this isn't one of MzScheme's goals.

Here's an alternative way to allow C to look inside strings and
arrays, without giving much away about how and where they live, or
when GC might occur:

http://sources.redhat.com/ml/guile/1999-01/msg00093.html

We discussed this, but as far as I know it was never implemented.


Posted on the users mailing list.