rts: Make allocatePinned always take a new block
This change surprisingly fixes quite bad fragmentation issues When a new block was stolen from the nursery it meant that on the next GC that the nursery had to be resized and the stolen block replaced. This led to a few (1 or 2) random blocks from the free list being added to the nursery, from which they would never escape. Over time, the rest of the blocks in these megablocks would get collected but the nursery would hold onto 1 block from many different megablocks. This led to the situation where there were many nearly empty megablocks in the free list.
-
Is ghc/ghc!5175 (closed) the upstream version of this idea?
-
@trac-jberryman Yes exactly.
Please register or sign in to comment