Draft: Allocate small pinned allocations directly in the non-moving heap
Previously allocatePinned
would allocate small pinned things into a per-capability accumulator block. While simple, this can result in bad internal fragmentation as allocations become unreachable since the block cannot be freed until all objects it backs die.
When the non-moving collector is in use we can do better by allocating pinned objects directly into the non-moving heap, avoiding much of the fragmentation potential of the old approach.
Edited by Ben Gamari