[MLton-user] Destructive update
Stephen Weeks
MLton-user@mlton.org
Wed, 8 Feb 2006 15:01:31 -0800
> isn't it true that the first thing is to say how much RAM a process
> can use, and then, given that number, what kind of GC to do (via
> stop-and-copy vs. 2-space)?
Yes.
> I don't see why it is always using the physical to determine the
> latter.
Perhaps I misspoke -- the physical amount of memory is *not* used to
determine the type of GC. It is the amount of memory the process is
told it has, as determined by ram-slop. The s->ram used to compute
the ratio that governs the type of GC
ratio = (float)s->ram / (float)live;
is the same one that was set at program start via
s->ram = align (s->ramSlop * s->totalRam, s->pageSize);