From: simonmar Date: Wed, 11 May 2005 09:09:03 +0000 (+0000) Subject: [project @ 2005-05-11 09:09:03 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~577 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a17f89ca30e09e26c68b3032155f614f2d09eca4;p=ghc-hetmet.git [project @ 2005-05-11 09:09:03 by simonmar] Fix double-linking bug in new allocateLocal(), and fix one warning --- 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;