diff options
author | Revo <projectrevotpp@hotmail.com> | 2020-09-17 15:09:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-17 15:09:45 -0400 |
commit | 198be57aa4c939285a31d9f148adf7e2de290dc1 (patch) | |
tree | 97bd76b7a318771b94aae1f8628a589b9fffa83d /src/SDK/OS/OSAlloc.c | |
parent | 55c1733ceb5a8176a2183fc3872cadb8bb220308 (diff) | |
parent | b4fe17ed30eb2f30bea203322b92be15a4bcb032 (diff) |
Merge pull request #46 from mparisi20/decompDArray
Decomp darray.o
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; |