uint32_t MEMGetAllocatableSizeForBlockHeapEx(MEMBlockHeap *heap, int32_t align)
MEMBlockHeap * MEMInitBlockHeap(MEMBlockHeap *heap, void *start, void *end, MEMBlockHeapTracking *blocks, uint32_t size, uint32_t flags)
MEMBlockHeapBlock defaultBlock
Default block, used so we don't have an empty block list.
MEMBlockHeapTracking defaultTrack
Default tracking heap, tracks only defaultBlock.
uint32_t blockCount
Number of blocks in this tracking heap.
void * start
First address of the data region this block has allocated.
MEMBlockHeapBlock * blocks
Pointer to first memory block.
MEMBlockHeapBlock * lastBlock
Last block in this heap.
void * MEMAllocFromBlockHeapEx(MEMBlockHeap *heap, uint32_t size, int32_t align)
MEMBlockHeapBlock * prev
Link to previous block, note that this is only set for allocated blocks.
void * MEMAllocFromBlockHeapAt(MEMBlockHeap *heap, void *addr, uint32_t size)
int MEMAddBlockHeapTracking(MEMBlockHeap *heap, MEMBlockHeapTracking *tracking, uint32_t size)
uint32_t MEMGetTrackingLeftInBlockHeap(MEMBlockHeap *heap)
uint32_t MEMGetTotalFreeSizeForBlockHeap(MEMBlockHeap *heap)
void * end
End address of the data region this block has allocated.
BOOL isFree
TRUE if the block is free, FALSE if allocated.
void * MEMDestroyBlockHeap(MEMBlockHeap *heap)
MEMBlockHeapBlock * firstFreeBlock
First free block.
MEMBlockHeapBlock * next
Link to next block, always set.
void MEMFreeToBlockHeap(MEMBlockHeap *heap, void *data)
MEMBlockHeapBlock * firstBlock
First block in this heap.
uint32_t numFreeBlocks
Free block count.