From 831f57c9563981a2e785e64b5d308922bd2c5af3 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 23 Nov 2006 13:58:25 +0000 Subject: [PATCH] fix failing assertion --- rts/sm/Storage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index 31af78f..6af2d19 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -578,7 +578,7 @@ allocate( nat n ) nat req_blocks = (lnat)BLOCK_ROUND_UP(n*sizeof(W_)) / BLOCK_SIZE; bd = allocGroup(req_blocks); dbl_link_onto(bd, &g0s0->large_objects); - g0s0->n_large_blocks += req_blocks; + g0s0->n_large_blocks += bd->blocks; // might be larger than req_blocks bd->gen_no = 0; bd->step = g0s0; bd->flags = BF_LARGE; @@ -662,7 +662,7 @@ allocateLocal (Capability *cap, nat n) ACQUIRE_SM_LOCK; bd = allocGroup(req_blocks); dbl_link_onto(bd, &g0s0->large_objects); - g0s0->n_large_blocks += req_blocks; + g0s0->n_large_blocks += bd->blocks; // might be larger than req_blocks bd->gen_no = 0; bd->step = g0s0; bd->flags = BF_LARGE; -- 1.7.10.4