summaryrefslogtreecommitdiff
path: root/rts/sm/NonMoving.h
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-03-03 23:42:14 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-03-14 05:28:43 -0400
commit20d4d676964382b313b9e44062e45a7c38621999 (patch)
treed575a7cf7de04ad22bb309ac22baef311464a907 /rts/sm/NonMoving.h
parent7c3e39a9a7ccb3b6c2953b0397a0d315dc0ec7d5 (diff)
downloadhaskell-20d4d676964382b313b9e44062e45a7c38621999.tar.gz
nonmoving: Don't traverse filled segment list in pause
The non-moving collector would previously walk the entire filled segment list during the preparatory pause. However, this is far more work than is strictly necessary. We can rather get away with merely collecting the allocators' filled segment list heads and process the lists themselves during the concurrent phase. This can significantly reduce the maximum gen1 GC pause time in programs with high rates of long-lived allocations.
Diffstat (limited to 'rts/sm/NonMoving.h')
-rw-r--r--rts/sm/NonMoving.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/rts/sm/NonMoving.h b/rts/sm/NonMoving.h
index 36ecd8b0af..6eabcb8493 100644
--- a/rts/sm/NonMoving.h
+++ b/rts/sm/NonMoving.h
@@ -62,6 +62,7 @@ struct NonmovingSegment {
// A non-moving allocator for a particular block size
struct NonmovingAllocator {
struct NonmovingSegment *filled;
+ struct NonmovingSegment *saved_filled;
struct NonmovingSegment *active;
// indexed by capability number
struct NonmovingSegment *current[];