diff options
Diffstat (limited to 'src/SDK/OS/OSAlloc.c')
-rw-r--r-- | src/SDK/OS/OSAlloc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/SDK/OS/OSAlloc.c b/src/SDK/OS/OSAlloc.c index e464e48..c553d8d 100644 --- a/src/SDK/OS/OSAlloc.c +++ b/src/SDK/OS/OSAlloc.c @@ -1,13 +1,7 @@ #include "types.h" +#include "consts.h" #include "OS/OSAlloc.h" -#define OSi_ROUND(n, a) (((u32) (n) + (a) - 1) & ~((a) - 1)) - -extern HeapDesc *HeapArray; - -#define HEADERSIZE OSi_ROUND(sizeof(Cell), 32) -#define MINOBJSIZE (HEADERSIZE+32) - inline Cell* DLAddFront(Cell* list, Cell* cell) { cell->next = list; @@ -78,6 +72,11 @@ Cell *DLInsert(Cell *original, Cell *inserted) return inserted; } +extern HeapDesc *HeapArray; + +#define HEADERSIZE OSi_ROUND(sizeof(Cell), 32) +#define MINOBJSIZE (HEADERSIZE+32) + void* OSAllocFromHeap(OSHeapHandle heap, u32 size) { HeapDesc* hd; Cell* cell; |