wut  v1.5.0
Wii U Toolchain
Typedefs | Enumerations | Functions
Memory
Collaboration diagram for Memory:

Typedefs

typedef enum OSMemoryType OSMemoryType
 
typedef enum OSSharedDataType OSSharedDataType
 

Enumerations

enum  OSMemoryType {
  OS_MEM1 = 1 ,
  OS_MEM2 = 2
}
 
enum  OSSharedDataType {
  OS_SHAREDDATATYPE_FONT_CHINESE = 0 ,
  OS_SHAREDDATATYPE_FONT_KOREAN = 1 ,
  OS_SHAREDDATATYPE_FONT_STANDARD = 2 ,
  OS_SHAREDDATATYPE_FONT_TAIWANESE = 3 ,
  OS_SHAREDDATATYPE_FONT_MAX = 4
}
 

Functions

BOOL OSGetSharedData (OSSharedDataType type, uint32_t unk_r4, void **outPtr, uint32_t *outSize)
 
void __OSRootLoadShared ()
 
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...
 
void __OSZeroProcessMemory (uint32_t proccesID)
 Zeros the memory for a given proccessID. More...
 

Detailed Description

Typedef Documentation

◆ OSMemoryType

typedef enum OSMemoryType OSMemoryType

◆ OSSharedDataType

Enumeration Type Documentation

◆ OSMemoryType

Enumerator
OS_MEM1 
OS_MEM2 

Definition at line 15 of file memory.h.

◆ OSSharedDataType

Enumerator
OS_SHAREDDATATYPE_FONT_CHINESE 
OS_SHAREDDATATYPE_FONT_KOREAN 
OS_SHAREDDATATYPE_FONT_STANDARD 
OS_SHAREDDATATYPE_FONT_TAIWANESE 
OS_SHAREDDATATYPE_FONT_MAX 

Definition at line 21 of file memory.h.

Function Documentation

◆ OSGetSharedData()

BOOL OSGetSharedData ( OSSharedDataType  type,
uint32_t  unk_r4,
void **  outPtr,
uint32_t *  outSize 
)

◆ __OSRootLoadShared()

void __OSRootLoadShared ( )

◆ 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.

◆ __OSZeroProcessMemory()

void __OSZeroProcessMemory ( uint32_t  proccesID)

Zeros the memory for a given proccessID.

Works only inside the ROOT process.