From 97f15badc84f6fbae1e11c5879dd161fd5e80dfe Mon Sep 17 00:00:00 2001 From: simonm Date: Tue, 19 Jan 1999 15:41:56 +0000 Subject: [PATCH] [project @ 1999-01-19 15:41:56 by simonm] Change the sizing for intermediate generations. Now the formula is max_size = max (oldgen_max * g / generations, RtsFlags.GcFlags.minOldGenSize) --- ghc/rts/GC.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 1b3dc0d..efc1a64 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.13 1999/01/19 15:07:53 simonm Exp $ + * $Id: GC.c,v 1.14 1999/01/19 15:41:56 simonm Exp $ * * Two-space garbage collector * @@ -455,16 +455,15 @@ void GarbageCollect(void (*get_roots)(void)) * between the maximum size of the oldest and youngest * generations. * - * max_blocks = alloc_area_size + - * (oldgen_max_blocks - alloc_area_size) * G - * ----------------------------------------- - * oldest_gen + * max_blocks = oldgen_max_blocks * G + * ----------------------- + * oldest_gen */ if (g != 0) { generations[g].max_blocks = - RtsFlags.GcFlags.minAllocAreaSize + - (((oldest_gen->max_blocks - RtsFlags.GcFlags.minAllocAreaSize) * g) - / (RtsFlags.GcFlags.generations-1)); + stg_max(RtsFlags.GcFlags.minOldGenSize, + (oldest_gen->max_blocks * g) / + (RtsFlags.GcFlags.generations-1)); } /* for older generations... */ -- 1.7.10.4