summaryrefslogtreecommitdiff
path: root/rts/Capability.c
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-03-04 10:16:07 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-08 18:24:42 -0500
commit47d6acd3be1fadc0c59b7b4d4e105242c0ae0b90 (patch)
tree8696b191951e5bd9fbb5441f4eb0ba8e5ab23084 /rts/Capability.c
parentdaa6363f49df0dceb2c460da500461e564aa9ea2 (diff)
downloadhaskell-47d6acd3be1fadc0c59b7b4d4e105242c0ae0b90.tar.gz
rts: Use a separate free block list for allocatePinned
The way in which allocatePinned took blocks out of the nursery was leading to horrible fragmentation in some workloads. The strategy now is that a separate free block list is reserved for each capability and blocks are taken from there. When it's empty the global SM lock is taken and a fresh block of size PINNED_EMPTY_SIZE is allocated. Fixes #19481
Diffstat (limited to 'rts/Capability.c')
-rw-r--r--rts/Capability.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/rts/Capability.c b/rts/Capability.c
index 136a62a71e..7a83821e00 100644
--- a/rts/Capability.c
+++ b/rts/Capability.c
@@ -314,6 +314,7 @@ initCapability (Capability *cap, uint32_t i)
cap->interrupt = 0;
cap->pinned_object_block = NULL;
cap->pinned_object_blocks = NULL;
+ cap->pinned_object_empty = NULL;
#if defined(PROFILING)
cap->r.rCCCS = CCS_SYSTEM;