gc tweaks

Stephen Weeks MLton@sourcelight.com
Wed, 22 Aug 2001 09:05:10 -0700


> I'm thinking of trying a simple re-write of the GC  just  to
> see  what I can get from low level tweaks.  For more serious stuff on the GC,
> it would be great if there were a bit in the header  of  objects  that  would
> tell  me  if it was mutable or not. 

This should be easy enough to add.

> This could be used in two distinct ways.
> One would be for the generational GC,  which  needs  to  know  about  mutable
> objects.    The  other  would  be  to  implement  something  that  I  had  in
> Mathematica: the `share' function.  When you call it on  a  data  object,  it
> returns  a  copy of that object which maximizes sharing.  In Mathematica, you
> could also call it on no arguments, which meant do this to the  entire  heap.
> This  was  great  for  saving  space  at judicious moments.  (In Mathematica,
> although a real piece of junk, all the heap was immutable.)

share sounds cool.  I wonder how much it would buy in the compiler itself.