Consider allocating pinned objects in the nonmoving heap directly
When the nonmoving garbage collector is enabled, allocatePinned
should be able to allocate pinned objects in the nonmoving heap directly. Large requests can still be served via BF_LARGE
blocks, but smaller requests should not need BF_PINNED
blocks anymore. This will largely solve the pinned object fragmentation issue (#19175) at least for the nonmoving case.
This strategy is mentioned in the "A Concurrent Garbage Collector for the Glasgow Haskell Compiler" report, but it's not implemented yet, and surprisingly there doesn't seem to be a ticket to track this feature request, so here it is.
Also related: #19175