[MLton-user] Destructive update

Stephen Weeks MLton-user@mlton.org
Wed, 8 Feb 2006 22:43:45 -0800


> Right, so my claim is the following: all uses of s->ramSlop * s->totalRam
> should be replaced by max-heap (if the latter is non-zero), and that should
> be the only use of max-heap. 

No.

> I.e., if you don't say any thing, then we use the physical ram size
> times ramSlop as the upper bound, otherwise use max-heap.

No.  ram-slop is not about bounding the heap.

> Isn't that the idea for what max-heap should be for?  It was
> certainly what I always assumed it was for.

Again, ram-slop and max-heap have different purposes.  ram-slop is
about providing the runtime with a (very simplistic) notion of how
much memory it can use before paging will occur.  ram-slop does not
set an upper bound.  On the other hand, max-heap does set an upper
bound, and that is all it does.

The uses of "ramSlop * totalRam" in gc.c should not be replaced by
maxHeap, since they are about making heap sizing decisions in order to
avoid paging.  The only use of maxHeap in gc.c is to place an upper
bound on the heap size.