|
wut v1.9.1
Wii U Toolchain
|
Functions for managing generic allocator objects. More...

Data Structures | |
| struct | MEMAllocator |
| Holds context information that will be used to allocate and free memory. More... | |
| struct | MEMAllocatorFunctions |
| The alloc/free functions. More... | |
Typedefs | |
| typedef struct MEMAllocatorFunctions | MEMAllocatorFunctions |
| typedef struct MEMAllocator | MEMAllocator |
| typedef void *(* | MEMAllocatorAllocFn) (MEMAllocator *allocator, uint32_t size) |
| typedef void(* | MEMAllocatorFreeFn) (MEMAllocator *allocator, void *ptr) |
Functions | |
| void * | MEMAllocFromAllocator (MEMAllocator *allocator, uint32_t size) |
| Allocates memory from the allocator. | |
| void | MEMFreeToAllocator (MEMAllocator *allocator, void *ptr) |
| Frees memory back to the allocator. | |
| void | MEMInitAllocatorForExpHeap (MEMAllocator *allocator, MEMHeapHandle heap, uint32_t alignment) |
| Initializes an allocator from an Expanded Heap. | |
| void | MEMInitAllocatorForFrmHeap (MEMAllocator *allocator, MEMHeapHandle heap, uint32_t alignment) |
| Initializes an allocator from a Frame Heap. | |
| void | MEMInitAllocatorForUnitHeap (MEMAllocator *allocator, MEMHeapHandle heap) |
| Initializes an allocator from a Unit Heap. | |
| void | MEMInitAllocatorForDefaultHeap (MEMAllocator *allocator) |
| Initializes an allocator from the Default Heap. | |
| void | MEMInitAllocatorForBlockHeap (MEMAllocator *allocator, MEMHeapHandle heap, uint32_t alignment) |
| Initializes an allocator from a Block Heap. | |
Functions for managing generic allocator objects.
| struct MEMAllocator |
Holds context information that will be used to allocate and free memory.
Definition at line 24 of file memallocator.h.
| Data Fields | ||
|---|---|---|
| MEMAllocatorFunctions * | funcs | Points to the alloc/free functions. |
| MEMHeapHandle | heap | The heap handle. |
| uint32_t | align | The alignment the allocator will use. |
| struct MEMAllocatorFunctions |
The alloc/free functions.
Definition at line 40 of file memallocator.h.
| Data Fields | ||
|---|---|---|
| MEMAllocatorAllocFn | alloc | |
| MEMAllocatorFreeFn | free | |
| typedef struct MEMAllocatorFunctions MEMAllocatorFunctions |
Definition at line 17 of file memallocator.h.
| typedef struct MEMAllocator MEMAllocator |
Definition at line 18 of file memallocator.h.
| typedef void *(* MEMAllocatorAllocFn) (MEMAllocator *allocator, uint32_t size) |
Definition at line 20 of file memallocator.h.
| typedef void(* MEMAllocatorFreeFn) (MEMAllocator *allocator, void *ptr) |
Definition at line 21 of file memallocator.h.
| void * MEMAllocFromAllocator | ( | MEMAllocator * | allocator, |
| uint32_t | size | ||
| ) |
Allocates memory from the allocator.
allocator->funcs.alloc(allocator, size). | void MEMFreeToAllocator | ( | MEMAllocator * | allocator, |
| void * | ptr | ||
| ) |
Frees memory back to the allocator.
It simply calls allocator->funcs.free(allocator, ptr).
| void MEMInitAllocatorForExpHeap | ( | MEMAllocator * | allocator, |
| MEMHeapHandle | heap, | ||
| uint32_t | alignment | ||
| ) |
Initializes an allocator from an Expanded Heap.
| void MEMInitAllocatorForFrmHeap | ( | MEMAllocator * | allocator, |
| MEMHeapHandle | heap, | ||
| uint32_t | alignment | ||
| ) |
Initializes an allocator from a Frame Heap.
| void MEMInitAllocatorForUnitHeap | ( | MEMAllocator * | allocator, |
| MEMHeapHandle | heap | ||
| ) |
Initializes an allocator from a Unit Heap.
| void MEMInitAllocatorForDefaultHeap | ( | MEMAllocator * | allocator | ) |
Initializes an allocator from the Default Heap.
| void MEMInitAllocatorForBlockHeap | ( | MEMAllocator * | allocator, |
| MEMHeapHandle | heap, | ||
| uint32_t | alignment | ||
| ) |
Initializes an allocator from a Block Heap.