From a17f89ca30e09e26c68b3032155f614f2d09eca4 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 11 May 2005 09:09:03 +0000 Subject: [PATCH] [project @ 2005-05-11 09:09:03 by simonmar] Fix double-linking bug in new allocateLocal(), and fix one warning --- ghc/rts/Storage.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ghc/rts/Storage.c b/ghc/rts/Storage.c index 7e07ff2..3d3178b 100644 --- a/ghc/rts/Storage.c +++ b/ghc/rts/Storage.c @@ -673,9 +673,7 @@ allocateLocal( StgRegTable *reg, nat n ) // to allocate() from. reg->rCurrentNursery->link = bd->link; } - bd->link = reg->rNursery->blocks; - reg->rNursery->blocks = bd; - bd->u.back = NULL; + dbl_link_onto(bd, ®->rNursery->blocks); reg->rCurrentAlloc = bd; } } @@ -822,12 +820,12 @@ calcAllocated( void ) { nat allocated; bdescr *bd; - nat i; allocated = allocated_bytes(); allocated += countNurseryBlocks() * BLOCK_SIZE_W; #ifdef SMP + nat i; for (i = 0; i < n_nurseries; i++) { Capability *cap; for ( bd = capabilities[i].r.rCurrentNursery->link; -- 1.7.10.4