[MLton-commit] r4575
Matthew Fluet
MLton@mlton.org
Wed, 24 May 2006 05:28:02 -0700
In r4572:
Calling translateHeap with s->heap.oldGenSize is incorrect, because
when heapRemap fails and heapCreate succeeds, s->heap is updated with
an newly initialized heap with oldGenSize == 0. Instead, call
translateHeap with size, which has the original oldGenSize.
However, it seems that leaving the newly initialized heap with
oldGenSize == 0 is incorrect, at it makes the heap appear to have no
data.
----------------------------------------------------------------------
U mlton/trunk/runtime/gc.c
----------------------------------------------------------------------
Modified: mlton/trunk/runtime/gc.c
===================================================================
--- mlton/trunk/runtime/gc.c 2006-05-24 12:23:53 UTC (rev 4574)
+++ mlton/trunk/runtime/gc.c 2006-05-24 12:28:01 UTC (rev 4575)
@@ -2826,6 +2826,7 @@
uint remaining;
pointer to;
+ h2.oldGenSize = size;
from = old + size;
to = h2.start + size;
remaining = size;