wut  v1.5.0
Wii U Toolchain
memunitheap.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 #include "memheap.h"
4 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 typedef struct MEMUnitHeap MEMUnitHeap;
17 
19 {
21 };
22 WUT_CHECK_OFFSET(MEMUnitHeapFreeBlock, 0x00, next);
23 WUT_CHECK_SIZE(MEMUnitHeapFreeBlock, 0x04);
24 
25 struct WUT_PACKED MEMUnitHeap
26 {
29  uint32_t blockSize;
30 };
31 WUT_CHECK_OFFSET(MEMUnitHeap, 0x00, header);
32 WUT_CHECK_OFFSET(MEMUnitHeap, 0x40, freeBlocks);
33 WUT_CHECK_OFFSET(MEMUnitHeap, 0x44, blockSize);
34 WUT_CHECK_SIZE(MEMUnitHeap, 0x48);
35 
38  uint32_t size,
39  uint32_t blockSize,
40  int32_t alignment,
41  uint16_t flags);
42 
43 void *
45 
46 void *
48 
49 void
51  void *block);
52 
53 void
55 
56 uint32_t
58 
59 uint32_t
60 MEMCalcHeapSizeForUnitHeap(uint32_t blockSize,
61  uint32_t count,
62  int32_t alignment);
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
MEMHeapHeader header
Definition: memunitheap.h:27
MEMUnitHeapFreeBlock * freeBlocks
Definition: memunitheap.h:28
MEMUnitHeapFreeBlock * next
Definition: memunitheap.h:20
uint32_t blockSize
Definition: memunitheap.h:29
uint32_t MEMCountFreeBlockForUnitHeap(MEMHeapHandle heap)
void MEMFreeToUnitHeap(MEMHeapHandle heap, void *block)
void MEMiDumpUnitHeap(MEMHeapHandle heap)
void * MEMAllocFromUnitHeap(MEMHeapHandle heap)
void * MEMDestroyUnitHeap(MEMHeapHandle heap)
MEMHeapHandle MEMCreateUnitHeapEx(void *heap, uint32_t size, uint32_t blockSize, int32_t alignment, uint16_t flags)
uint32_t MEMCalcHeapSizeForUnitHeap(uint32_t blockSize, uint32_t count, int32_t alignment)