diff options
author | Simon Marlow <simonmarhaskell@gmail.com> | 2008-04-16 23:29:06 +0000 |
---|---|---|
committer | Simon Marlow <simonmarhaskell@gmail.com> | 2008-04-16 23:29:06 +0000 |
commit | 77798610bc585a1eea3b6695c4a3fee1ccba70ba (patch) | |
tree | 5da6464cf5240e644647e8f6065762177e4fcd35 /rts/sm/GCUtils.c | |
parent | 49780c2e25cfbe821d585c5a31cb95aa49f41f14 (diff) | |
download | haskell-77798610bc585a1eea3b6695c4a3fee1ccba70ba.tar.gz |
Use the BF_EVACUATED flag to indicate to-space consistently
BF_EVACUATED is now set on all blocks except those that we are
copying. This means we don't need a separate test for gen>N in
evacuate(), because in generations older than N, BF_EVACUATED will be
set anyway. The disadvantage is that we have to reset the
BF_EVACUATED flag on the blocks of any generation we're collecting
before starting GC. Results in a small speed improvement.
Diffstat (limited to 'rts/sm/GCUtils.c')
-rw-r--r-- | rts/sm/GCUtils.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/rts/sm/GCUtils.c b/rts/sm/GCUtils.c index 7e1aaa11e6..2a31e2358b 100644 --- a/rts/sm/GCUtils.c +++ b/rts/sm/GCUtils.c @@ -205,7 +205,6 @@ StgPtr alloc_todo_block (step_workspace *ws, nat size) { bdescr *bd, *hd, *tl; - StgWord32 flags; // Grab a part block if we have one, and it has enough room if (ws->part_list != NULL && @@ -217,15 +216,8 @@ alloc_todo_block (step_workspace *ws, nat size) } else { - // blocks in to-space in generations up to and including N - // get the BF_EVACUATED flag. - if (ws->step->gen_no <= N) { - flags = BF_EVACUATED; - } else { - flags = 0; - } allocBlocks_sync(4, &hd, &tl, - ws->step->gen_no, ws->step, flags); + ws->step->gen_no, ws->step, BF_EVACUATED); tl->link = ws->part_list; ws->part_list = hd->link; |