Memory cards
Size classes trade internal fragmentation for speed
confidence: mediumupdated: 2026-11-25status: activeallocatorsize-classfragmentation
Claim#
Rounding a request to a class makes the free list O(1) and wastes the delta. A large delta is internal fragmentation.
Test#
Allocate sizes around a class boundary. Measure the RSS delta and the class distribution.
Proof#
A class layout with a bounded waste.
Failure modes#
A class that is too coarse wastes memory. A perfect-fit list is slow.