diff options
author | Max <mparisi@stevens.edu> | 2020-09-16 19:04:12 -0400 |
---|---|---|
committer | Max <mparisi@stevens.edu> | 2020-09-16 19:04:12 -0400 |
commit | 88cdd94339cc0307dac9f2a9e30465d6f4c203d2 (patch) | |
tree | 613448a41b57baf67a7daebe67461da48b13367a /src/SDK/OS/OSAlloc.c | |
parent | dc0f921d287d2c9c1ee270bf633a67543b829d91 (diff) |
Added inferred inline functions ArrayInsert and ArrayCheckGrow
Diffstat (limited to 'src/SDK/OS/OSAlloc.c')
-rw-r--r-- | src/SDK/OS/OSAlloc.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/SDK/OS/OSAlloc.c b/src/SDK/OS/OSAlloc.c index c553d8d..f0ff04d 100644 --- a/src/SDK/OS/OSAlloc.c +++ b/src/SDK/OS/OSAlloc.c @@ -2,7 +2,7 @@ #include "consts.h" #include "OS/OSAlloc.h" -inline Cell* DLAddFront(Cell* list, Cell* cell) +static inline Cell* DLAddFront(Cell* list, Cell* cell) { cell->next = list; cell->prev = NULL; @@ -12,7 +12,7 @@ inline Cell* DLAddFront(Cell* list, Cell* cell) return cell; } -inline Cell* DLExtract(Cell* list, Cell* cell) +static inline Cell* DLExtract(Cell* list, Cell* cell) { if (cell->next) { cell->next->prev = cell->prev; @@ -72,12 +72,13 @@ Cell *DLInsert(Cell *original, Cell *inserted) return inserted; } -extern HeapDesc *HeapArray; +extern HeapDesc *HeapArray; #define HEADERSIZE OSi_ROUND(sizeof(Cell), 32) #define MINOBJSIZE (HEADERSIZE+32) -void* OSAllocFromHeap(OSHeapHandle heap, u32 size) { +void* OSAllocFromHeap(OSHeapHandle heap, u32 size) +{ HeapDesc* hd; Cell* cell; Cell* newCell; @@ -126,7 +127,8 @@ void* OSAllocFromHeap(OSHeapHandle heap, u32 size) { return (void *)((char *)cell + HEADERSIZE); } -void OSFreeToHeap(OSHeapHandle heap, void* ptr) { +void OSFreeToHeap(OSHeapHandle heap, void* ptr) +{ OSHeapInfo *heapInfo; HeapDesc *hd; Cell *cell; |