[gclist] Re: gclist-digest V3 #84

Charles Fiterman cef@geodesic.com
Wed, 21 Jun 2000 07:14:28 -0500


At 11:57 AM 6/21/00 +1200, you wrote:
>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.

Erlang must be a functional language otherwise you'd have inter heap
pointers. 

>	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.)

There is a lot wrong with finalizers but death notices seem to be
implementable giving an independent collection thread.