kiba-engine
Data Fields
linear_allocator_block Struct Reference

Internal state of the linear_allocator. More...

Collaboration diagram for linear_allocator_block:

Data Fields

usize size
 Size of the managable space.
 
usize cur_offset
 Current offset into the block for the next allocation.
 
struct linear_allocator_blocknext
 Pointer to the next block in the linked list.
 
void * data
 Pointer to beginning of managed memory block.
 

Detailed Description

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.

Definition at line 21 of file linear.c.


The documentation for this struct was generated from the following file: