summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-10-22 21:15:24 +0000
committerBen Gamari <ben@smart-cactus.org>2023-01-09 15:22:49 -0500
commit8b82a2b0cc77810ff31b0802b1e0a20e50360a87 (patch)
treea9d00fbb5114c29188b7dda45d7966db1f9f3f79
parent25fdeee7a3e6bb829f78d5633a2b6a91f7c6e9bc (diff)
downloadhaskell-8b82a2b0cc77810ff31b0802b1e0a20e50360a87.tar.gz
nonmoving: Fix tracking of FILLED_SWEEPING segments
Previously we only updated the state of the segment at the head of each allocator's filled list.
-rw-r--r--rts/sm/NonMoving.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/sm/NonMoving.c b/rts/sm/NonMoving.c
index fdb6c5a364..32575088eb 100644
--- a/rts/sm/NonMoving.c
+++ b/rts/sm/NonMoving.c
@@ -1073,6 +1073,7 @@ static void nonmovingMark_(MarkQueue *mark_queue, StgWeak **dead_weaks, StgTSO *
while (true) {
// Set snapshot
nonmovingSegmentInfo(seg)->next_free_snap = seg->next_free;
+ SET_SEGMENT_STATE(seg, FILLED_SWEEPING);
n_filled++;
if (seg->link) {
seg = seg->link;
@@ -1081,7 +1082,6 @@ static void nonmovingMark_(MarkQueue *mark_queue, StgWeak **dead_weaks, StgTSO *
}
}
// add filled segments to sweep_list
- SET_SEGMENT_STATE(seg, FILLED_SWEEPING);
seg->link = nonmovingHeap.sweep_list;
nonmovingHeap.sweep_list = filled;
}