mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-06 15:08:13 +01:00
coreinit: Merge baseheap.h into memheap.h
This commit is contained in:
parent
3c763b7a08
commit
3e117fe667
@ -39,11 +39,6 @@ OSXorAtomic64
|
||||
OSTestAndClearAtomic64
|
||||
OSTestAndSetAtomic64
|
||||
|
||||
// coreinit/baseheap.h
|
||||
MEMGetArena
|
||||
MEMGetBaseHeapHandle
|
||||
MEMSetBaseHeapHandle
|
||||
|
||||
// coreinit/blockheap.h
|
||||
MEMInitBlockHeap
|
||||
MEMDestroyBlockHeap
|
||||
@ -248,6 +243,9 @@ MCP_DeviceList
|
||||
MCP_FullDeviceList
|
||||
|
||||
// coreinit/memheap.h
|
||||
MEMGetArena
|
||||
MEMGetBaseHeapHandle
|
||||
MEMSetBaseHeapHandle
|
||||
MEMDumpHeap
|
||||
MEMFindContainHeap
|
||||
MEMGetFillValForHeap
|
||||
|
@ -1,46 +0,0 @@
|
||||
#pragma once
|
||||
#include <wut.h>
|
||||
|
||||
/**
|
||||
* \defgroup coreinit_baseheap Base Heap
|
||||
* \ingroup coreinit
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void *MEMHeapHandle;
|
||||
|
||||
typedef enum MEMBaseHeapType
|
||||
{
|
||||
MEM_BASE_HEAP_MEM1 = 0,
|
||||
MEM_BASE_HEAP_MEM2 = 1,
|
||||
MEM_BASE_HEAP_FG = 8,
|
||||
} MEMBaseHeapType;
|
||||
|
||||
/**
|
||||
* Get which memory area a heap belongs to.
|
||||
*/
|
||||
MEMBaseHeapType
|
||||
MEMGetArena(MEMHeapHandle handle);
|
||||
|
||||
/**
|
||||
* Get base heap for memory area.
|
||||
*/
|
||||
MEMHeapHandle
|
||||
MEMGetBaseHeapHandle(MEMBaseHeapType type);
|
||||
|
||||
/**
|
||||
* Set base heap for memory area.
|
||||
*/
|
||||
MEMHeapHandle
|
||||
MEMSetBaseHeapHandle(MEMBaseHeapType type,
|
||||
MEMHeapHandle handle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
@ -16,6 +16,14 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct MEMHeapHeader MEMHeapHeader;
|
||||
typedef MEMHeapHeader *MEMHeapHandle;
|
||||
|
||||
typedef enum MEMBaseHeapType
|
||||
{
|
||||
MEM_BASE_HEAP_MEM1 = 0,
|
||||
MEM_BASE_HEAP_MEM2 = 1,
|
||||
MEM_BASE_HEAP_FG = 8,
|
||||
} MEMBaseHeapType;
|
||||
|
||||
typedef enum MEMHeapFillType
|
||||
{
|
||||
@ -74,11 +82,35 @@ CHECK_OFFSET(MEMHeapHeader, 0x20, lock);
|
||||
CHECK_OFFSET(MEMHeapHeader, 0x30, flags);
|
||||
CHECK_SIZE(MEMHeapHeader, 0x40);
|
||||
|
||||
|
||||
/**
|
||||
* Get which memory area a heap belongs to.
|
||||
*/
|
||||
MEMBaseHeapType
|
||||
MEMGetArena(MEMHeapHandle handle);
|
||||
|
||||
|
||||
/**
|
||||
* Get base heap for memory area.
|
||||
*/
|
||||
MEMHeapHandle
|
||||
MEMGetBaseHeapHandle(MEMBaseHeapType type);
|
||||
|
||||
|
||||
/**
|
||||
* Set base heap for memory area.
|
||||
*/
|
||||
MEMHeapHandle
|
||||
MEMSetBaseHeapHandle(MEMBaseHeapType type,
|
||||
MEMHeapHandle handle);
|
||||
|
||||
|
||||
/**
|
||||
* Print details about heap to COSWarn
|
||||
*/
|
||||
void
|
||||
MEMDumpHeap(MEMHeapHeader *heap);
|
||||
MEMDumpHeap(MEMHeapHandle heap);
|
||||
|
||||
|
||||
/**
|
||||
* Find heap which contains a memory block.
|
||||
@ -86,12 +118,14 @@ MEMDumpHeap(MEMHeapHeader *heap);
|
||||
MEMHeapHeader *
|
||||
MEMFindContainHeap(void *block);
|
||||
|
||||
|
||||
/**
|
||||
* Get the data fill value used when MEM_HEAP_FLAG_DEBUG_MODE is set.
|
||||
*/
|
||||
uint32_t
|
||||
MEMGetFillValForHeap(MEMHeapFillType type);
|
||||
|
||||
|
||||
/**
|
||||
* Set the data fill value used when MEM_HEAP_FLAG_DEBUG_MODE is set.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user