Microchip® Advanced Software Framework

membag Struct Reference

Internal structure used by membag to keep track of memory, with maximum 32 blocks per membag.

Data Fields

uint32_t allocated
 
size_t block_size
 
uint8_t blocks_free
 
uintptr_t end
 
size_t num_blocks
 
uintptr_t start
 

uint32_t membag::allocated

32-bit integer used to keep track of allocations.

Referenced by membag_alloc(), membag_free(), and membag_init().

size_t membag::block_size
uint8_t membag::blocks_free
uintptr_t membag::end

Pointer to end of this bag.

Referenced by membag_free(), and membag_init().

size_t membag::num_blocks

Total number of blocks.

Referenced by membag_alloc(), membag_get_total(), and membag_init().

uintptr_t membag::start

Pointer to start of this bag.

Referenced by membag_alloc(), membag_free(), and membag_init().