X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FGCUtils.c;h=57cede7d43390dc4605404792b1d212278e61fd6;hb=6a34402a940c4bf515b0ab5a90da904027a897ef;hp=86d2282980d07cd44f53b9e9659c547457f09140;hpb=8b18faef8aeaf40150c208272a2fc117611e8ae8;p=ghc-hetmet.git diff --git a/rts/sm/GCUtils.c b/rts/sm/GCUtils.c index 86d2282..57cede7 100644 --- a/rts/sm/GCUtils.c +++ b/rts/sm/GCUtils.c @@ -149,8 +149,13 @@ push_scanned_block (bdescr *bd, step_workspace *ws) StgPtr todo_block_full (nat size, step_workspace *ws) { + StgPtr p; bdescr *bd; + // todo_free has been pre-incremented by Evac.c:alloc_for_copy(). We + // are expected to leave it bumped when we've finished here. + ws->todo_free -= size; + bd = ws->todo_bd; ASSERT(bd != NULL); @@ -167,7 +172,9 @@ todo_block_full (nat size, step_workspace *ws) ws->todo_lim = stg_min(bd->start + BLOCK_SIZE_W, ws->todo_lim + stg_max(WORK_UNIT_WORDS,size)); debugTrace(DEBUG_gc, "increasing limit for %p to %p", bd->start, ws->todo_lim); - return ws->todo_free; + p = ws->todo_free; + ws->todo_free += size; + return p; } } @@ -212,7 +219,9 @@ todo_block_full (nat size, step_workspace *ws) alloc_todo_block(ws, size); - return ws->todo_free; + p = ws->todo_free; + ws->todo_free += size; + return p; } StgPtr