[MLton-devel] new heap resizing approach

Stephen Weeks MLton@mlton.org
Mon, 22 Apr 2002 18:44:59 -0700


> Consider the following: you have a huge amount alive for a few generations,
> then you shrink to almost nothing.  The first or second GC after the shrink
> is the case I'm thinking of.  Yes: the first GC where the GC discovers that
> not much is alive will allocate a to space which is largs (because it doesn't
> know that not much is alive when it starts).  The next GC, which knows that
> x is small, will incorrectly assume that the GC is going to use L * x of old
> space, but it is really going to use y.

You are wrong on two counts.

1. The first GC that discovers not much is alive after the GC will
shrink the to space then and there.

2. It doesn't matter what the next GC assumes about the previous heap
sizes.  When we are about to GC, we can do nothing to change the size
of from space or the amount live -- and that is all that affects the
performance of this GC.  The only thing we can do on this GC is
attempt to set things up so that the next GC is better.

_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel