summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dolphin/os.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/dolphin/os.h b/include/dolphin/os.h
index 8dadda8..a40118d 100644
--- a/include/dolphin/os.h
+++ b/include/dolphin/os.h
@@ -57,6 +57,20 @@ u32 __OSCoreClock AT_ADDRESS(OS_BASE_CACHED | 0x00FC); // sync with OSLoMem.h
#define OSRoundUp32BPtr(v) (void *)OSRoundUp32B(v)
#define OSRoundDown32BPtr(v) (void *)OSRoundDown32B(v)
+typedef s32 OSHeapHandle;
+
+extern volatile OSHeapHandle __OSCurrHeap;
+
+void* OSInitAlloc(void*, void*, s32);
+OSHeapHandle OSCreateHeap(void*, void*);
+OSHeapHandle OSSetCurrentHeap(OSHeapHandle);
+void* OSAllocFromHeap(OSHeapHandle, s32);
+long OSCheckHeap(OSHeapHandle);
+void OSFreeToHeap(OSHeapHandle heap, void* ptr);
+
+#define OSAlloc(size) OSAllocFromHeap(__OSCurrHeap, (size))
+#define OSFree(ptr) OSFreeToHeap(__OSCurrHeap, (ptr))
+
void* OSGetArenaHi(void);
void* OSGetArenaLo(void);
void OSSetArenaHi(void* newHi);