mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-07 23:40:44 +01:00
Add frameheap functions.
This commit is contained in:
parent
948f03758a
commit
b3da4d60c1
62
include/coreinit/frameheap.h
Normal file
62
include/coreinit/frameheap.h
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <wut.h>
|
||||||
|
|
||||||
|
WUT_LIB_HEADER_START
|
||||||
|
|
||||||
|
typedef uint32_t MEMFrameHeapFreeMode;
|
||||||
|
|
||||||
|
enum MEMFrameHeapFreeMode
|
||||||
|
{
|
||||||
|
MEM_FRAME_HEAP_FREE_FROM_BOTTOM = 1 << 0,
|
||||||
|
MEM_FRAME_HEAP_FREE_FROM_TOP = 1 << 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
MEMFrameHeap *
|
||||||
|
MEMCreateFrmHeap(MEMFrameHeap *heap,
|
||||||
|
uint32_t size);
|
||||||
|
|
||||||
|
MEMFrameHeap *
|
||||||
|
MEMCreateFrmHeapEx(MEMFrameHeap *heap,
|
||||||
|
uint32_t size,
|
||||||
|
uint16_t flags);
|
||||||
|
|
||||||
|
void *
|
||||||
|
MEMDestroyFrmHeap(MEMFrameHeap *heap);
|
||||||
|
|
||||||
|
void *
|
||||||
|
MEMAllocFromFrmHeap(MEMFrameHeap *heap,
|
||||||
|
uint32_t size);
|
||||||
|
|
||||||
|
void *
|
||||||
|
MEMAllocFromFrmHeapEx(MEMFrameHeap *heap,
|
||||||
|
uint32_t size,
|
||||||
|
int alignment);
|
||||||
|
|
||||||
|
void
|
||||||
|
MEMFreeToFrmHeap(MEMFrameHeap *heap,
|
||||||
|
MEMFrameHeapFreeMode mode);
|
||||||
|
|
||||||
|
BOOL
|
||||||
|
MEMRecordStateForFrmHeap(MEMFrameHeap *heap,
|
||||||
|
uint32_t tag);
|
||||||
|
|
||||||
|
BOOL
|
||||||
|
MEMFreeByStateToFrmHeap(MEMFrameHeap *heap,
|
||||||
|
uint32_t tag);
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
MEMAdjustFrmHeap(MEMFrameHeap *heap);
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
MEMResizeForMBlockFrmHeap(MEMFrameHeap *heap,
|
||||||
|
uint32_t addr,
|
||||||
|
uint32_t size);
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
MEMGetAllocatableSizeForFrmHeap(MEMFrameHeap *heap);
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
MEMGetAllocatableSizeForFrmHeapEx(MEMFrameHeap *heap,
|
||||||
|
int alignment);
|
||||||
|
|
||||||
|
WUT_LIB_HEADER_END
|
@ -113,6 +113,20 @@ EXPORT(MEMGetSizeForMBlockExpHeap);
|
|||||||
EXPORT(MEMGetGroupIDForMBlockExpHeap);
|
EXPORT(MEMGetGroupIDForMBlockExpHeap);
|
||||||
EXPORT(MEMGetAllocDirForMBlockExpHeap);
|
EXPORT(MEMGetAllocDirForMBlockExpHeap);
|
||||||
|
|
||||||
|
// coreinit/frameheap.h
|
||||||
|
EXPORT(MEMCreateFrmHeap);
|
||||||
|
EXPORT(MEMCreateFrmHeapEx);
|
||||||
|
EXPORT(MEMDestroyFrmHeap);
|
||||||
|
EXPORT(MEMAllocFromFrmHeap);
|
||||||
|
EXPORT(MEMAllocFromFrmHeapEx);
|
||||||
|
EXPORT(MEMFreeToFrmHeap);
|
||||||
|
EXPORT(MEMRecordStateForFrmHeap);
|
||||||
|
EXPORT(MEMFreeByStateToFrmHeap);
|
||||||
|
EXPORT(MEMAdjustFrmHeap);
|
||||||
|
EXPORT(MEMResizeForMBlockFrmHeap);
|
||||||
|
EXPORT(MEMGetAllocatableSizeForFrmHeap);
|
||||||
|
EXPORT(MEMGetAllocatableSizeForFrmHeapEx);
|
||||||
|
|
||||||
// coreinit/mutex.h
|
// coreinit/mutex.h
|
||||||
EXPORT(OSInitMutex);
|
EXPORT(OSInitMutex);
|
||||||
EXPORT(OSInitMutexEx);
|
EXPORT(OSInitMutexEx);
|
||||||
|
Loading…
Reference in New Issue
Block a user