/* -----------------------------------------------------------------------------
- * $Id: GC.c,v 1.12 1999/01/18 16:05:15 simonm Exp $
+ * $Id: GC.c,v 1.13 1999/01/19 15:07:53 simonm Exp $
*
* Two-space garbage collector
*
*/
if (major_gc) {
oldest_gen->max_blocks =
- stg_max(oldest_gen->steps[0].to_blocks * 2,
- RtsFlags.GcFlags.minAllocAreaSize * 4);
+ stg_max(oldest_gen->steps[0].to_blocks * RtsFlags.GcFlags.oldGenFactor,
+ RtsFlags.GcFlags.minOldGenSize);
if (oldest_gen->max_blocks > RtsFlags.GcFlags.maxHeapSize / 2) {
oldest_gen->max_blocks = RtsFlags.GcFlags.maxHeapSize / 2;
if (((int)oldest_gen->max_blocks - (int)oldest_gen->steps[0].to_blocks) <
/* -----------------------------------------------------------------------------
- * $Id: RtsFlags.c,v 1.3 1999/01/13 17:25:42 simonm Exp $
+ * $Id: RtsFlags.c,v 1.4 1999/01/19 15:07:55 simonm Exp $
*
* Functions for parsing the argument list.
*
RtsFlags.GcFlags.initialStkSize = 1024 / sizeof(W_);
RtsFlags.GcFlags.minAllocAreaSize = (256 * 1024) / BLOCK_SIZE;
+ RtsFlags.GcFlags.minOldGenSize = (1024 * 1024) / BLOCK_SIZE;
RtsFlags.GcFlags.maxHeapSize = (64 * 1024 * 1024) / BLOCK_SIZE;
RtsFlags.GcFlags.pcFreeHeap = 3; /* 3% */
+ RtsFlags.GcFlags.oldGenFactor = 2;
RtsFlags.GcFlags.generations = 2;
RtsFlags.GcFlags.forceGC = rtsFalse;
RtsFlags.GcFlags.ringBell = rtsTrue;
break;
+ case 'F':
+ RtsFlags.GcFlags.oldGenFactor = atof(rts_argv[arg]+2);
+
+ if (RtsFlags.GcFlags.oldGenFactor < 0)
+ bad_option( rts_argv[arg] );
+ break;
+
#ifdef DEBUG
case 'D':
/* hack warning: interpret the flags as a binary number */
/* -----------------------------------------------------------------------------
- * $Id: RtsFlags.h,v 1.3 1999/01/13 17:25:43 simonm Exp $
+ * $Id: RtsFlags.h,v 1.4 1999/01/19 15:07:55 simonm Exp $
*
* Datatypes that holds the command-line flag settings.
*
nat maxHeapSize; /* in *blocks* */
nat minAllocAreaSize; /* in *blocks* */
+ nat minOldGenSize; /* in *blocks* */
+ double oldGenFactor;
double pcFreeHeap;
nat generations;
/* -----------------------------------------------------------------------------
- * $Id: Storage.c,v 1.3 1999/01/13 17:25:47 simonm Exp $
+ * $Id: Storage.c,v 1.4 1999/01/19 15:07:56 simonm Exp $
*
* Storage manager front end
*
generations[g].n_steps = 1;
generations[g].steps =
stgMallocBytes(1 * sizeof(struct _step), "initStorage: last step");
- generations[g].max_blocks = RtsFlags.GcFlags.minAllocAreaSize * 4;
+ generations[g].max_blocks = RtsFlags.GcFlags.minOldGenSize;
step = &generations[g].steps[0];
step->no = 0;
step->gen = &generations[g];
generations[g].n_steps = 2;
generations[g].steps = stgMallocBytes (2 * sizeof(struct _step),
"initStorage: steps");
- generations[g].max_blocks = RtsFlags.GcFlags.minAllocAreaSize * 4;
+ generations[g].max_blocks = RtsFlags.GcFlags.minOldGenSize;
}
for (g = 0; g < RtsFlags.GcFlags.generations-1; g++) {