wut  1.0.0-beta8
Wii U Toolchain
memory.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 typedef enum OSMemoryType
16 {
17  OS_MEM1 = 1,
18  OS_MEM2 = 2,
19 } OSMemoryType;
20 
44 void *
45 OSBlockMove(void *dst,
46  const void *src,
47  uint32_t size,
48  BOOL flush);
49 
65 void *
66 OSBlockSet(void *dst,
67  uint8_t val,
68  uint32_t size);
69 
70 void *
71 OSAllocFromSystem(uint32_t size,
72  int align);
73 
74 void
75 OSFreeToSystem(void *ptr);
76 
93 BOOL
94 OSGetForegroundBucket(uint32_t *outAddr,
95  uint32_t *outSize);
96 
110 BOOL
111 OSGetForegroundBucketFreeArea(uint32_t *outAddr,
112  uint32_t *outSize);
113 
129 int
131  uint32_t *outAddr,
132  uint32_t *outSize);
133 
134 #ifdef __cplusplus
135 }
136 #endif
137 
BOOL OSGetForegroundBucketFreeArea(uint32_t *outAddr, uint32_t *outSize)
Gets the location and size of the application-usable portion of the foreground bucket area.
OSMemoryType
Definition: memory.h:15
int OSGetMemBound(OSMemoryType type, uint32_t *outAddr, uint32_t *outSize)
Gets the location and size of available memory areas.
BOOL OSGetForegroundBucket(uint32_t *outAddr, uint32_t *outSize)
Gets the location and size of the foreground bucket memory area.
void * OSAllocFromSystem(uint32_t size, int align)
Definition: memory.h:17
void * OSBlockSet(void *dst, uint8_t val, uint32_t size)
Fills a chunk of memory with the given value, like memset.
void * OSBlockMove(void *dst, const void *src, uint32_t size, BOOL flush)
Moves chunks of memory around, similarly to memmove.
void OSFreeToSystem(void *ptr)
int32_t BOOL
Definition: wut_types.h:4
Definition: memory.h:18