Note [Segment allocation strategy]

rts/sm/NonMoving.c:565 rts 1 ticket

Non-moving segments must be aligned. In order, to efficiently service these
allocations, we allocate segments in bulk
We allocate an entire megablocks worth of segments at once.
All unused segments are placed on the `nonmovingHeap.free` list.

Symmetrically we only de-allocate segments if all the segments in a megablock are free-able, ie,
are on `nonmovingHeap.free`. We prune the free list in `nonmovingPruneFreeSegmentList`,
called during concurrent sweep phase.
Note that during pruning of the free list, free segments are not available for use by the
mutator. This might lead to extra allocation of segments. But the risk is low as just after sweep
there is usually a large amount of partially full segments, and pruning the free list is quite
quick.

See #24150

References 0

This Note does not link to any other.

Referenced by 1