[gclist] Re: gclist-digest V3 #84

Richard A. O'Keefe ok@atlas.otago.ac.nz
Wed, 21 Jun 2000 11:57:40 +1200 (NZST)

Charles Fiterman <cef@geodesic.com> wrote:
	Most programs these days are multi threaded which means even if
	collection occurs only at allocation points any thread can see
	it as happening anywhere.
Surely Erlang can't be the only system with a per-thread heap?
(The concurrent version of Quintus Prolog, which Tim Lindholm built,
also did this, if I remember correctly.)  The reason for having a
per-thread heap is precisely so that other threads *don't* need to
be stopped.  Erlang does have "binaries" that are shared between threads,
but they can't contain pointers, so a form of reference counting would
work nicely for them.

	Since we were discussing conservative collection let me point out. If a
	language supports finalizers or their relatives e.g. weak pointers, death
	notices etc. conservative collection is a problem. Aunt Edna's social
	security number can look like a pointer and impede the collection of an
	object. Now impeding the collection of an object is mostly harmless but
	impeding its finalizer, death notice etc. is not harmless since mutator
	semantics can depend on it. 
But finalisers have that problem _anyway_.  *All* garbage collection is
conservative to a greater or lesser degree, even the reference-counting
scheme in Limbo.  (Reason:  unsolvability of the Halting Problem, basically.)