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
Showing
- rts/Capability.c 1 addition, 0 deletionsrts/Capability.c
- rts/Capability.h 2 additions, 0 deletionsrts/Capability.h
- rts/sm/Sanity.c 5 additions, 2 deletionsrts/sm/Sanity.c
- rts/sm/Storage.c 149 additions, 13 deletionsrts/sm/Storage.c
- testsuite/tests/rts/T19481.hs 56 additions, 0 deletionstestsuite/tests/rts/T19481.hs
- testsuite/tests/rts/all.T 2 additions, 0 deletionstestsuite/tests/rts/all.T
Loading
Please register or sign in to comment