Module alloc

Source
Expand description

This module provides a simple allocator. One implementation is the BestFitAllocator, which uses the best fit strategy.

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.

Constants§

MAX_ADDR

Traits§

Allocator
Allocator trait that provides a way to allocate and free memory. Normally you don’t need to use this directly, rather use the boxed::Box type.