From 09e136ea2aa53ab73f3a31be542aeba18e33320c Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 15 Sep 2020 13:00:20 -0400 Subject: added consts.h --- src/SDK/OS/OSAlloc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/SDK/OS/OSAlloc.c') 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; -- cgit v1.2.3