kiba-engine
|
Internal state of the linear_allocator. More...
Data Fields | |
usize | size |
Size of the managable space. | |
usize | cur_offset |
Current offset into the block for the next allocation. | |
struct linear_allocator_block * | next |
Pointer to the next block in the linked list. | |
void * | data |
Pointer to beginning of managed memory block. | |
Internal state of the linear_allocator.
Memory is managed as a linked list. The initial memory block provides at least the requested amount of memory. It will add a new block to the list if the old one is either full or a requested allocation cannot be served with the current blocks. New blocks are added to the start of the list.