summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-10-22 21:15:24 +0000
committerZubin Duggal <zubin.duggal@gmail.com>2023-04-14 13:07:39 +0530
commit986028e8569e45431e2996da3a15241383a671ab (patch)
treee5fa2777a155ba00047ae9ec791a0ff667a24612
parenta5fb11767af9527a0900728eb40f637f87cb18ee (diff)
downloadhaskell-986028e8569e45431e2996da3a15241383a671ab.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. (cherry picked from commit 4392965d14920117db2cf4ce460dec6f094f6dfe)
-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 b7dc8b6ac2..405d365dc6 100644
--- a/rts/sm/NonMoving.c
+++ b/rts/sm/NonMoving.c
@@ -1074,6 +1074,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;
@@ -1082,7 +1083,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;
}