Skip to content

Commit

Permalink
[project @ 1999-01-20 16:24:02 by simonm]
Browse files Browse the repository at this point in the history
Make use of -F<factor> flag in the two-space collector.
  • Loading branch information
simonm committed Jan 20, 1999
1 parent 4d2db16 commit e0bbfe9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ghc/rts/GC.c
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------------
* $Id: GC.c,v 1.17 1999/01/20 16:07:40 simonm Exp $
* $Id: GC.c,v 1.18 1999/01/20 16:24:02 simonm Exp $
*
* Two-space garbage collector
*
Expand Down Expand Up @@ -434,7 +434,8 @@ void GarbageCollect(void (*get_roots)(void))
*/
nat blocks = g0s0->to_blocks;

if ( blocks * 4 > RtsFlags.GcFlags.maxHeapSize ) {
if ( blocks * RtsFlags.GcFlags.oldGenFactor * 2 >
RtsFlags.GcFlags.maxHeapSize ) {
int adjusted_blocks; /* signed on purpose */
int pc_free;

Expand All @@ -447,7 +448,7 @@ void GarbageCollect(void (*get_roots)(void))
blocks = adjusted_blocks;

} else {
blocks *= 2;
blocks *= RtsFlags.GcFlags.oldGenFactor;
if (blocks < RtsFlags.GcFlags.minAllocAreaSize) {
blocks = RtsFlags.GcFlags.minAllocAreaSize;
}
Expand Down

0 comments on commit e0bbfe9

Please sign in to comment.