diff options
author | red031000 <rubenru09@aol.com> | 2020-09-15 18:26:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-15 18:26:38 +0100 |
commit | 27f9506eda2852ac4a9e99f1a00222c86afe317d (patch) | |
tree | 02b50e14ca025b2fc1a8253e39545066904f2138 /include/SDK/OS | |
parent | 8966018f1784d46e9f3099e37f13478b3a884338 (diff) | |
parent | 09e136ea2aa53ab73f3a31be542aeba18e33320c (diff) |
Merge pull request #44 from mparisi20/decompOSAlloc
Decompile OSAlloc.o
Diffstat (limited to 'include/SDK/OS')
-rw-r--r-- | include/SDK/OS/OSAlloc.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/SDK/OS/OSAlloc.h b/include/SDK/OS/OSAlloc.h index 150a5f8..7a1e006 100644 --- a/include/SDK/OS/OSAlloc.h +++ b/include/SDK/OS/OSAlloc.h @@ -5,6 +5,8 @@ extern "C" { #endif +typedef s32 OSHeapHandle; + typedef struct Cell Cell; struct Cell { @@ -13,7 +15,23 @@ struct Cell { long size; }; +typedef struct { + long size; + Cell *free; + Cell *allocated; +} HeapDesc; + +typedef struct { + volatile OSHeapHandle currentHeap; + int numHeaps; + void* arenaStart; + void* arenaEnd; + HeapDesc* heapArray; +} OSHeapInfo; + Cell *DLInsert(Cell *original, Cell *inserted); +void *OSAllocFromHeap(OSHeapHandle heap, u32 size); +void OSFreeToHeap(OSHeapHandle heap, void *ptr); #ifdef __cplusplus } |