[gclist] Experience with conservative GC sought

Fergus Henderson fjh@cs.mu.OZ.AU
Fri, 23 Jan 1998 14:49:53 +1100


On 22-Jan-1998, Carl Bruggeman <bruggema@ranger.uta.edu> wrote:
> > Suggestion:  It seems to me it should be trivial to plug Boehm's
> > collector into the current version of emacs:  just have the collect
> > handler nil out the pointers on the root stack before doing a
> > collection (no need to remove any of the current GC support code). 
> 
> The current version obviously has pointers that are encoded for run
> time tagging, while it is the new version based on Guile/SCM that they
> are considering using the Boehm collector.  So, to carry out this
> experiment, either the new version of emacs has to be used, or the
> Boehm collector has to be modified to recognize the encoding scheme in
> the current version and treat any word that matches the encoding for
> emacs pointers as potential pointers (doesn't sound too bad).  Anyone
> know off hand if either of these are feasible? (Hans?)

How does Emacs currently tag pointers?
If you're just tagging the low-order bits, then it is trivial to
get the Boehm collector to recognize this.

	int i;
	for (i = 1; i < (1 << TAGBITS); i++) {
		GC_register_displacement(i);
	}

On the other hand, if you're tagging the high-order bits, then it
would definitely be harder -- not impossible, but a non-trivial
amount of work.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.