[project @ 1999-02-24 16:25:40 by simonm]
authorsimonm <unknown>
Wed, 24 Feb 1999 16:25:40 +0000 (16:25 +0000)
committersimonm <unknown>
Wed, 24 Feb 1999 16:25:40 +0000 (16:25 +0000)
- Fix a couple of uninitialized variables
- Fill the nursery with junk after GC if sanity checking is on

ghc/rts/GC.c

index d35d83b..4ea3694 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: GC.c,v 1.38 1999/02/23 15:45:06 simonm Exp $
+ * $Id: GC.c,v 1.39 1999/02/24 16:25:40 simonm Exp $
  *
  * (c) The GHC Team 1998-1999
  *
@@ -561,6 +561,8 @@ void GarbageCollect(void (*get_roots)(void))
   }
   small_alloc_list = NULL;
   alloc_blocks = 0;
+  alloc_Hp = NULL;
+  alloc_HpLim = NULL;
   alloc_blocks_lim = RtsFlags.GcFlags.minAllocAreaSize;
 
   /* Two-space collector:
@@ -676,6 +678,7 @@ void GarbageCollect(void (*get_roots)(void))
     bd->free = bd->start;
     ASSERT(bd->gen == g0);
     ASSERT(bd->step == g0s0);
+    IF_DEBUG(sanity,memset(bd->start, 0xaa, BLOCK_SIZE));
   }
   current_nursery = g0s0->blocks;