diff options
Diffstat (limited to 'rts/sm/NonMovingSweep.c')
-rw-r--r-- | rts/sm/NonMovingSweep.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/rts/sm/NonMovingSweep.c b/rts/sm/NonMovingSweep.c index 89efe8f1ad..1a7c97b7e6 100644 --- a/rts/sm/NonMovingSweep.c +++ b/rts/sm/NonMovingSweep.c @@ -31,12 +31,11 @@ enum SweepResult { GNUC_ATTR_HOT static enum SweepResult nonmovingSweepSegment(struct NonmovingSegment *seg) { + const nonmoving_block_idx blk_cnt = nonmovingSegmentBlockCount(seg); bool found_free = false; bool found_live = false; - for (nonmoving_block_idx i = 0; - i < nonmovingSegmentBlockCount(seg); - ++i) + for (nonmoving_block_idx i = 0; i < blk_cnt; ++i) { if (seg->bitmap[i] == nonmovingMarkEpoch) { found_live = true; |