wut  1.0.0-beta9
Wii U Toolchain
Typedefs | Enumerations | Functions
Memory

Typedefs

typedef enum OSMemoryType OSMemoryType
 

Enumerations

enum  OSMemoryType {
  OS_MEM1 = 1,
  OS_MEM2 = 2
}
 

Functions

void * OSBlockMove (void *dst, const void *src, uint32_t size, BOOL flush)
 Moves chunks of memory around, similarly to memmove. More...
 
void * OSBlockSet (void *dst, uint8_t val, uint32_t size)
 Fills a chunk of memory with the given value, like memset. More...
 
void * OSAllocFromSystem (uint32_t size, int align)
 
void OSFreeToSystem (void *ptr)
 
BOOL OSGetForegroundBucket (uint32_t *outAddr, uint32_t *outSize)
 Gets the location and size of the foreground bucket memory area. More...
 
BOOL OSGetForegroundBucketFreeArea (uint32_t *outAddr, uint32_t *outSize)
 Gets the location and size of the application-usable portion of the foreground bucket area. More...
 
int OSGetMemBound (OSMemoryType type, uint32_t *outAddr, uint32_t *outSize)
 Gets the location and size of available memory areas. More...
 

Detailed Description

Typedef Documentation

◆ OSMemoryType

typedef enum OSMemoryType OSMemoryType

Enumeration Type Documentation

◆ OSMemoryType

Enumerator
OS_MEM1 
OS_MEM2 

Definition at line 15 of file memory.h.

Function Documentation

◆ OSBlockMove()

void* OSBlockMove ( void *  dst,
const void *  src,
uint32_t  size,
BOOL  flush 
)

Moves chunks of memory around, similarly to memmove.

Overlapping source and destination regions are supported.

Parameters
dstThe destination address for the move.
srcThe source address for the move.
sizeThe size of the data to be moved, in bytes.
flushWhether to flush the data caches for the source and destination.
Returns
dst is returned.
Note
This function makes use of the cache to speed up the copy, so a flush is recommended.

◆ OSBlockSet()

void* OSBlockSet ( void *  dst,
uint8_t  val,
uint32_t  size 
)

Fills a chunk of memory with the given value, like memset.

Parameters
dstPointer to the memory to fill.
valByte value to be set.
sizeNumber of bytes to be set to val.
Returns
dst is returned.

◆ OSAllocFromSystem()

void* OSAllocFromSystem ( uint32_t  size,
int  align 
)

◆ OSFreeToSystem()

void OSFreeToSystem ( void *  ptr)

◆ OSGetForegroundBucket()

BOOL OSGetForegroundBucket ( uint32_t *  outAddr,
uint32_t *  outSize 
)

Gets the location and size of the foreground bucket memory area.

Note
This function may not account for the system reserved portion of the foreground bucket. Consider using OSGetForegroundBucketFreeArea() instead.
Parameters
outAddrPointer to write the foreground bucket's address to.
outSizePointer to write the foreground bucket's size to.
Returns
true on success.

◆ OSGetForegroundBucketFreeArea()

BOOL OSGetForegroundBucketFreeArea ( uint32_t *  outAddr,
uint32_t *  outSize 
)

Gets the location and size of the application-usable portion of the foreground bucket area.

Parameters
outAddrPointer to write the bucket area's address to.
outSizePointer to write the bucket area's size to.
Returns
true on success.

◆ OSGetMemBound()

int OSGetMemBound ( OSMemoryType  type,
uint32_t *  outAddr,
uint32_t *  outSize 
)

Gets the location and size of available memory areas.

Parameters
typeType of memory to get information about. See OSMemoryType.
outAddrPointer to write the area's address to.
outSizePointer to write the area's size to.
Returns
0 on success, -1 otherwise.