- Detect when items in LinearPool::freeItems are touching and introduce free item ranges.
- Compact (collapse) adjacent free ranges that are touching into a single range, example [0, 43] and [44, 59] -> [0, 59].
- Possibly look into storing free ranges as a sorted tree structure to help with compacting.
struct ItemRange
{
uint32 begin = 0;
uint32 end = 0;
};
It can help to reduce freeItems array memory usage.