WUT  0.1
Wii U Toolchain
frameheap.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 
16 {
21 
22 typedef struct MEMFrameHeap MEMFrameHeap;
24 
26 {
27  uint32_t tag;
28  void *head;
29  void *tail;
31 };
32 CHECK_OFFSET(MEMFrameHeapState, 0x00, tag);
33 CHECK_OFFSET(MEMFrameHeapState, 0x04, head);
34 CHECK_OFFSET(MEMFrameHeapState, 0x08, tail);
35 CHECK_OFFSET(MEMFrameHeapState, 0x0C, previous);
36 CHECK_SIZE(MEMFrameHeapState, 0x10);
37 
39 {
41  void *head;
42  void *tail;
44 };
45 CHECK_OFFSET(MEMFrameHeap, 0x00, header);
46 CHECK_OFFSET(MEMFrameHeap, 0x40, head);
47 CHECK_OFFSET(MEMFrameHeap, 0x44, tail);
48 CHECK_OFFSET(MEMFrameHeap, 0x48, previousState);
49 CHECK_SIZE(MEMFrameHeap, 0x4C);
50 
52 MEMCreateFrmHeapEx(void *heap,
53  uint32_t size,
54  uint32_t flags);
55 
56 void *
58 
59 void *
61  uint32_t size,
62  int alignment);
63 
64 void
67 
68 BOOL
70  uint32_t tag);
71 
72 BOOL
74  uint32_t tag);
75 
76 uint32_t
78 
79 uint32_t
81  uint32_t addr,
82  uint32_t size);
83 
84 uint32_t
86  int alignment);
87 
88 #ifdef __cplusplus
89 }
90 #endif
91 
MEMFrameHeapState * previousState
Definition: frameheap.h:43
uint32_t MEMGetAllocatableSizeForFrmHeapEx(MEMFrameHeap *heap, int alignment)
MEMHeapHeader header
Definition: frameheap.h:40
MEMFrameHeap * MEMCreateFrmHeapEx(void *heap, uint32_t size, uint32_t flags)
BOOL MEMFreeByStateToFrmHeap(MEMFrameHeap *heap, uint32_t tag)
uint32_t tag
Definition: frameheap.h:27
uint32_t MEMResizeForMBlockFrmHeap(MEMFrameHeap *heap, uint32_t addr, uint32_t size)
void * head
Definition: frameheap.h:41
void * MEMAllocFromFrmHeapEx(MEMFrameHeap *heap, uint32_t size, int alignment)
BOOL MEMRecordStateForFrmHeap(MEMFrameHeap *heap, uint32_t tag)
MEMFrameHeapFreeMode
Definition: frameheap.h:15
int BOOL
Definition: wut_types.h:4
void * tail
Definition: frameheap.h:42
uint32_t MEMAdjustFrmHeap(MEMFrameHeap *heap)
void * MEMDestroyFrmHeap(MEMFrameHeap *heap)
MEMFrameHeapState * previous
Definition: frameheap.h:30
void MEMFreeToFrmHeap(MEMFrameHeap *heap, MEMFrameHeapFreeMode mode)