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 |
Number of bytes per block in this bag.
Referenced by membag_alloc(), membag_free(), membag_get_largest_free_block_size(), membag_get_smallest_free_block_size(), membag_get_total(), membag_get_total_free(), and membag_init().
uint8_t membag::blocks_free |
Counter for number of free blocks.
Referenced by membag_alloc(), membag_free(), membag_get_largest_free_block_size(), membag_get_smallest_free_block_size(), membag_get_total_free(), and membag_init().
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().