Commit fdfa2d01 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

nonmoving: Remove redundant bitmap clearing

nonmovingSweep already clears the bitmap in the sweep loop. There is no
reason to do so a second time.
parent 20d4d676
Pipeline #16703 failed with stages
in 354 minutes and 19 seconds
......@@ -26,7 +26,8 @@ enum SweepResult {
};
// Determine which list a marked segment should be placed on and initialize
// next_free indices as appropriate.
// next_free indices as appropriate. Additionally, we must clear the mark
// bitmap entries associated with swept blocks.
GNUC_ATTR_HOT static enum SweepResult
nonmovingSweepSegment(struct NonmovingSegment *seg)
{
......@@ -40,6 +41,8 @@ nonmovingSweepSegment(struct NonmovingSegment *seg)
if (seg->bitmap[i] == nonmovingMarkEpoch) {
found_live = true;
} else if (!found_free) {
// This is the first free block we've found; set next_free,
// next_free_snap, and the scan pointer.
found_free = true;
seg->next_free = i;
nonmovingSegmentInfo(seg)->next_free_snap = i;
......@@ -65,7 +68,6 @@ nonmovingSweepSegment(struct NonmovingSegment *seg)
} else {
ASSERT(seg->next_free == 0);
ASSERT(nonmovingSegmentInfo(seg)->next_free_snap == 0);
nonmovingClearBitmap(seg);
return SEGMENT_FREE;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment