[MLton-commit] r6603
Matthew Fluet
fluet at mlton.org
Tue Apr 22 17:22:57 PDT 2008
Release card/cross map when paging heap to disk.
----------------------------------------------------------------------
U mlton/trunk/runtime/gc/heap.c
----------------------------------------------------------------------
Modified: mlton/trunk/runtime/gc/heap.c
===================================================================
--- mlton/trunk/runtime/gc/heap.c 2008-04-23 00:22:51 UTC (rev 6602)
+++ mlton/trunk/runtime/gc/heap.c 2008-04-23 00:22:54 UTC (rev 6603)
@@ -337,6 +337,13 @@
}
data = GC_diskBack_write (orig, size);
releaseHeap (s, curHeapp);
+ if (s->mutatorMarksCards) {
+ releaseCardMapAndCrossMap (s,
+ s->generationalMaps.cardMap,
+ s->generationalMaps.cardMapLength * CARD_MAP_ELEM_SIZE,
+ s->generationalMaps.crossMap,
+ s->generationalMaps.crossMapLength * CROSS_MAP_ELEM_SIZE);
+ }
if (createHeap (s, curHeapp, desiredSize, minSize)) {
if (DEBUG or s->controls.messages) {
fprintf (stderr,
@@ -347,6 +354,10 @@
GC_diskBack_read (data, curHeapp->start, size);
GC_diskBack_close (data);
curHeapp->oldGenSize = size;
+ if (s->mutatorMarksCards) {
+ createCardMapAndCrossMap (s);
+ updateCrossMap (s);
+ }
} else {
GC_diskBack_close (data);
if (s->controls.messages)
More information about the MLton-commit
mailing list