wut  v1.7.0
Wii U Toolchain
Data Structures | Typedefs | Enumerations | Functions
memheap.h File Reference
#include <wut.h>
#include "spinlock.h"
#include "memlist.h"
Include dependency graph for memheap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  MEMHeapHeader
 

Typedefs

typedef struct MEMHeapHeader MEMHeapHeader
 
typedef MEMHeapHeaderMEMHeapHandle
 
typedef enum MEMBaseHeapType MEMBaseHeapType
 
typedef enum MEMHeapFillType MEMHeapFillType
 
typedef enum MEMHeapTag MEMHeapTag
 
typedef enum MEMHeapFlags MEMHeapFlags
 

Enumerations

enum  MEMBaseHeapType {
  MEM_BASE_HEAP_MEM1 = 0 ,
  MEM_BASE_HEAP_MEM2 = 1 ,
  MEM_BASE_HEAP_FG = 8
}
 
enum  MEMHeapFillType {
  MEM_HEAP_FILL_TYPE_UNUSED = 0 ,
  MEM_HEAP_FILL_TYPE_ALLOCATED = 1 ,
  MEM_HEAP_FILL_TYPE_FREED = 2
}
 
enum  MEMHeapTag {
  MEM_BLOCK_HEAP_TAG = 0x424C4B48u ,
  MEM_EXPANDED_HEAP_TAG = 0x45585048u ,
  MEM_FRAME_HEAP_TAG = 0x46524D48u ,
  MEM_UNIT_HEAP_TAG = 0x554E5448u ,
  MEM_USER_HEAP_TAG = 0x55535248u
}
 
enum  MEMHeapFlags {
  MEM_HEAP_FLAG_ZERO_ALLOCATED = 1 << 0 ,
  MEM_HEAP_FLAG_DEBUG_MODE = 1 << 1 ,
  MEM_HEAP_FLAG_USE_LOCK = 1 << 2
}
 

Functions

MEMBaseHeapType MEMGetArena (MEMHeapHandle handle)
 Get which memory area a heap belongs to. More...
 
MEMHeapHandle MEMGetBaseHeapHandle (MEMBaseHeapType type)
 Get base heap for memory area. More...
 
MEMHeapHandle MEMSetBaseHeapHandle (MEMBaseHeapType type, MEMHeapHandle handle)
 Set base heap for memory area. More...
 
MEMHeapHandle MEMCreateUserHeapHandle (void *heap, uint32_t size)
 Create a heap handle for a user defined heap. More...
 
void MEMDumpHeap (MEMHeapHandle heap)
 Print details about heap to COSWarn. More...
 
MEMHeapHeaderMEMFindContainHeap (void *block)
 Find heap which contains a memory block. More...
 
MEMHeapHandle MEMFindParentHeap (MEMHeapHandle handle)
 Find the parent heap of a given heap. More...
 
uint32_t MEMGetFillValForHeap (MEMHeapFillType type)
 Get the data fill value used when MEM_HEAP_FLAG_DEBUG_MODE is set. More...
 
void MEMSetFillValForHeap (MEMHeapFillType type, uint32_t value)
 Set the data fill value used when MEM_HEAP_FLAG_DEBUG_MODE is set. More...
 
BOOL MEMCheckHeap (MEMHeapHandle handle)
 Checks the heap for corruption. More...