[project @ 1999-01-19 17:22:55 by simonm]
authorsimonm <unknown>
Tue, 19 Jan 1999 17:22:55 +0000 (17:22 +0000)
committersimonm <unknown>
Tue, 19 Jan 1999 17:22:55 +0000 (17:22 +0000)
Don't forget to reset the evacuated flag on to-space blocks when
generations == 1.

ghc/rts/GC.c

index a154012..937a356 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: GC.c,v 1.15 1999/01/19 17:06:02 simonm Exp $
+ * $Id: GC.c,v 1.16 1999/01/19 17:22:55 simonm Exp $
  *
  * Two-space garbage collector
  *
@@ -567,6 +567,9 @@ void GarbageCollect(void (*get_roots)(void))
     if (old_to_space != NULL) {
       freeChain(old_to_space);
     }
+    for (bd = g0s0->to_space; bd != NULL; bd = bd->link) {
+      bd->evacuated = 0;       /* now from-space */
+    }
     live = g0s0->to_blocks * BLOCK_SIZE_W + 
       ((lnat)g0s0->hp_bd->free - (lnat)g0s0->hp_bd->start) / sizeof(W_);