X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FStorage.c;h=73ef53f036207085e6983084f1361f6e4f9a5995;hb=f9d15f9fccae4706fbdf8ee4ecaef7da9953cb74;hp=f0506cd77cd8037a8774b8c723e2153f770f98f6;hpb=ce9a12321f228ab68934e3031c32ab7f9a2173fc;p=ghc-hetmet.git diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index f0506cd..73ef53f 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -411,8 +411,7 @@ allocNursery (step *stp, bdescr *tail, nat blocks) if (tail != NULL) { tail->u.back = bd; } - bd->step = stp; - bd->gen_no = 0; + initBdescr(bd, stp); bd->flags = 0; bd->free = bd->start; tail = bd; @@ -612,8 +611,7 @@ allocateInGen (generation *g, lnat n) dbl_link_onto(bd, &stp->large_objects); stp->n_large_blocks += bd->blocks; // might be larger than req_blocks alloc_blocks += bd->blocks; - bd->gen_no = g->no; - bd->step = stp; + initBdescr(bd, stp); bd->flags = BF_LARGE; bd->free = bd->start + n; ret = bd->start; @@ -624,8 +622,7 @@ allocateInGen (generation *g, lnat n) bd = stp->blocks; if (bd == NULL || bd->free + n > bd->start + BLOCK_SIZE_W) { bd = allocBlock(); - bd->gen_no = g->no; - bd->step = stp; + initBdescr(bd, stp); bd->flags = 0; bd->link = stp->blocks; stp->blocks = bd; @@ -676,8 +673,7 @@ splitLargeBlock (bdescr *bd, nat blocks) dbl_link_onto(new_bd, &g0s0->large_objects); g0s0->n_large_blocks += new_bd->blocks; - new_bd->gen_no = g0s0->no; - new_bd->step = g0s0; + initBdescr(new_bd, g0s0); new_bd->flags = BF_LARGE; new_bd->free = bd->free; ASSERT(new_bd->free <= new_bd->start + new_bd->blocks * BLOCK_SIZE_W); @@ -733,8 +729,7 @@ allocateLocal (Capability *cap, lnat n) bd = allocBlock(); cap->r.rNursery->n_blocks++; RELEASE_SM_LOCK; - bd->gen_no = 0; - bd->step = cap->r.rNursery; + initBdescr(bd, cap->r.rNursery); bd->flags = 0; // NO: alloc_blocks++; // calcAllocated() uses the size of the nursery, and we've @@ -807,8 +802,7 @@ allocatePinned( lnat n ) pinned_object_block = bd = allocBlock(); dbl_link_onto(bd, &g0s0->large_objects); g0s0->n_large_blocks++; - bd->gen_no = 0; - bd->step = g0s0; + initBdescr(bd, g0s0); bd->flags = BF_PINNED | BF_LARGE; bd->free = bd->start; alloc_blocks++;