wut  v1.7.0
Wii U Toolchain
Data Structures | Typedefs | Functions
Block Heap
Collaboration diagram for Block Heap:

Data Structures

struct  MEMBlockHeapTracking
 
struct  MEMBlockHeapBlock
 
struct  MEMBlockHeap
 

Typedefs

typedef struct MEMBlockHeapBlock MEMBlockHeapBlock
 
typedef struct MEMBlockHeapTracking MEMBlockHeapTracking
 
typedef struct MEMBlockHeap MEMBlockHeap
 

Functions

MEMHeapHandle MEMInitBlockHeap (MEMBlockHeap *heap, void *start, void *end, MEMBlockHeapTracking *blocks, uint32_t size, uint32_t flags)
 
void * MEMDestroyBlockHeap (MEMHeapHandle heap)
 
int MEMAddBlockHeapTracking (MEMHeapHandle heap, MEMBlockHeapTracking *tracking, uint32_t size)
 
void * MEMAllocFromBlockHeapAt (MEMHeapHandle heap, void *addr, uint32_t size)
 
void * MEMAllocFromBlockHeapEx (MEMHeapHandle heap, uint32_t size, int32_t align)
 
void MEMFreeToBlockHeap (MEMHeapHandle heap, void *data)
 
uint32_t MEMGetAllocatableSizeForBlockHeapEx (MEMHeapHandle heap, int32_t align)
 
uint32_t MEMGetTrackingLeftInBlockHeap (MEMHeapHandle heap)
 
uint32_t MEMGetTotalFreeSizeForBlockHeap (MEMHeapHandle heap)
 

Detailed Description


Data Structure Documentation

◆ MEMBlockHeapTracking

struct MEMBlockHeapTracking

Definition at line 19 of file memblockheap.h.

Data Fields
MEMBlockHeapBlock * blocks Pointer to first memory block.
uint32_t blockCount Number of blocks in this tracking heap.

◆ MEMBlockHeapBlock

struct MEMBlockHeapBlock

Definition at line 33 of file memblockheap.h.

Data Fields
void * start First address of the data region this block has allocated.
void * end End address of the data region this block has allocated.
BOOL isFree TRUE if the block is free, FALSE if allocated.
MEMBlockHeapBlock * prev Link to previous block, note that this is only set for allocated blocks.
MEMBlockHeapBlock * next Link to next block, always set.

◆ MEMBlockHeap

struct MEMBlockHeap

Definition at line 57 of file memblockheap.h.

Data Fields
MEMHeapHeader header
MEMBlockHeapTracking defaultTrack Default tracking heap, tracks only defaultBlock.
MEMBlockHeapBlock defaultBlock Default block, used so we don't have an empty block list.
MEMBlockHeapBlock * firstBlock First block in this heap.
MEMBlockHeapBlock * lastBlock Last block in this heap.
MEMBlockHeapBlock * firstFreeBlock First free block.
uint32_t numFreeBlocks Free block count.

Typedef Documentation

◆ MEMBlockHeapBlock

Definition at line 1 of file memblockheap.h.

◆ MEMBlockHeapTracking

Definition at line 1 of file memblockheap.h.

◆ MEMBlockHeap

typedef struct MEMBlockHeap MEMBlockHeap

Definition at line 1 of file memblockheap.h.

Function Documentation

◆ MEMInitBlockHeap()

MEMHeapHandle MEMInitBlockHeap ( MEMBlockHeap heap,
void *  start,
void *  end,
MEMBlockHeapTracking blocks,
uint32_t  size,
uint32_t  flags 
)

◆ MEMDestroyBlockHeap()

void* MEMDestroyBlockHeap ( MEMHeapHandle  heap)

◆ MEMAddBlockHeapTracking()

int MEMAddBlockHeapTracking ( MEMHeapHandle  heap,
MEMBlockHeapTracking tracking,
uint32_t  size 
)

◆ MEMAllocFromBlockHeapAt()

void* MEMAllocFromBlockHeapAt ( MEMHeapHandle  heap,
void *  addr,
uint32_t  size 
)

◆ MEMAllocFromBlockHeapEx()

void* MEMAllocFromBlockHeapEx ( MEMHeapHandle  heap,
uint32_t  size,
int32_t  align 
)

◆ MEMFreeToBlockHeap()

void MEMFreeToBlockHeap ( MEMHeapHandle  heap,
void *  data 
)

◆ MEMGetAllocatableSizeForBlockHeapEx()

uint32_t MEMGetAllocatableSizeForBlockHeapEx ( MEMHeapHandle  heap,
int32_t  align 
)

◆ MEMGetTrackingLeftInBlockHeap()

uint32_t MEMGetTrackingLeftInBlockHeap ( MEMHeapHandle  heap)

◆ MEMGetTotalFreeSizeForBlockHeap()

uint32_t MEMGetTotalFreeSizeForBlockHeap ( MEMHeapHandle  heap)