[MLton-commit] r4571
Matthew Fluet
MLton@mlton.org
Tue, 23 May 2006 19:17:02 -0700
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.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c 2006-05-23 19:53:29 UTC (rev 4570)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c 2006-05-24 02:17:01 UTC (rev 4571)
@@ -199,7 +199,7 @@
if (s->controls.messages)
fprintf(stderr,
"[Requested %s cannot be satisfied, "
- "backing off by %s (min size = %s).\n",
+ "backing off by %s (min size = %s).]\n",
sizeToBytesApproxString (h->size),
sizeToBytesApproxString (backoff),
sizeToBytesApproxString (minSize));
@@ -288,6 +288,7 @@
from = curHeapp->start + size;
to = newHeap.start + size;
+ newHeap.oldGenSize = size;
remaining = size;
copy:
assert (remaining == (size_t)(from - curHeapp->start)
@@ -347,7 +348,7 @@
}
done:
unless (orig == s->heap.start) {
- translateHeap (s, orig, s->heap.start, s->heap.oldGenSize);
+ translateHeap (s, orig, s->heap.start, size);
setCardMapAbsolute (s);
}
}