3 ms·
Summary: the “fixed size” refers to both the allocations that can be made and the memory pool. At startup they allocate an array of N fixed-size blocks, with f
by Someone 4y ago
Summary: the “fixed size” refers to both the allocations that can be made and the memory pool.
At startup they allocate an array of N fixed-size blocks, with free blocks linked in a linked list that uses a free block’s memory to store a pointer to the next free block.
To prevent a possibly lengthy startup time, they lazily initialize that list.
Neat, but not a general-purpose allocator.