Unsplittable free-block remainder
ID: unsplittable-free-block-remainder
An unsplittable free-block remainder is the positive suffix left by a proposed allocation that is too small to retain as a valid independent free list record. Its size is below the allocator's minimum free-block size. The region still contains unused bytes, but the chosen representation cannot manage it as a separate free extent. The issue arises because free-region metadata can occupy the regions themselves.[ref]
Let a chosen block have size , let the proposed allocated extent after header/alignment rounding be , and let the minimum free size be . With remainder , an allocator that absorbs an undersized suffix usesThis is one possible policy, not a mandatory allocator interface. The absorbed suffix adds bytes of internal fragmentation beyond the bookkeeping and rounding already included in .
For an original example, take bytes, an8-byte allocated header,16-byte block granularity and bytes. A56-byte payload gives , leaving a representable32-byte free block. A57-byte payload instead gives , leaving an unusable16-byte suffix. Absorbing it reserves all96 bytes. Increasing the request by just one byte has therefore increased this allocation's occupied extent by32 bytes.
If and all extents are multiples of a granularity , a positive absorbed suffix is at most bytes. Without that granularity condition, the general integer-byte bound is . Choosing another free block or another representation can change the tradeoff. Later memory block coalescing can recover adjacent space when allocations are returned, but it does not make an invalid intermediate free record representable.
New to topics? Read the docs here!