diff options
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 } |