/* -----------------------------------------------------------------------------
- * $Id: Storage.c,v 1.44 2001/08/08 10:50:37 simonmar Exp $
+ * $Id: Storage.c,v 1.48 2001/08/09 12:46:06 sewardj Exp $
*
* (c) The GHC Team, 1998-1999
*
static void stgDeallocForGMP (void *ptr, size_t size);
void
-initStorage (void)
+initStorage( void )
{
nat g, s;
step *stp;
}
#endif
- if (RtsFlags.GcFlags.heapSizeSuggestion >
+ if (RtsFlags.GcFlags.maxHeapSize != 0 &&
+ RtsFlags.GcFlags.heapSizeSuggestion >
RtsFlags.GcFlags.maxHeapSize) {
RtsFlags.GcFlags.maxHeapSize = RtsFlags.GcFlags.heapSizeSuggestion;
}
stp->scan = NULL;
stp->scan_bd = NULL;
stp->large_objects = NULL;
+ stp->n_large_blocks = 0;
stp->new_large_objects = NULL;
stp->scavenged_large_objects = NULL;
+ stp->n_scavenged_large_blocks = 0;
stp->is_compacted = 0;
+ stp->bitmap = NULL;
}
}
generations[g].steps[s].to = &generations[g+1].steps[0];
}
- /* The oldest generation has one step. */
+ /* The oldest generation has one step and it is compacted. */
+ if (RtsFlags.GcFlags.compact) {
+ oldest_gen->steps[0].is_compacted = 1;
+ }
oldest_gen->steps[0].to = &oldest_gen->steps[0];
/* generation 0 is special: that's the nursery */