Module bestfit

Module bestfit 

Source

Structsยง

BestFitAllocator
This is an allocator implementation that uses the best fit strategy. That does mean, when we allocate a block, we try to find the smallest block that fits the requested size. Blocks are stored in a singly linked list. The important part is that the linked list is stored in-line with the memory blocks. This means that every block has a header that contains the size of the block and a pointer to the next block.
BestFitMeta ๐Ÿ”’
The metadata that is before any block in the BestFitAllocator.