[MLton] share weirdness

Stephen Weeks MLton@mlton.org
Thu, 20 Apr 2006 19:56:14 -0700


> All of this kind of argues that either hashCons() should only check
> the true bytes or else the background should be zero'd, just for
> repeatability and to maximize sharing.

I would go for the former, since then only MLton.share pays the cost
and not the mutator.  However, currently, not enough information about
object layout makes it to the runtime to do this.

> Right, but with the copying GC, we don't return fromspace to the OS;
> we keep it around to be the next tospace.  So, it is very probably
> that the mutator won't see zeros at the frontier.

Same for the mark-compact GC.  The point is that both reuse memory
without zeroing it out.