diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2023-11-26 22:01:42 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-27 12:01:42 +1100 |
| commit | 6dd16009361b2561f77b7933981611a9b975fa21 (patch) | |
| tree | 606f9bd82debe312be65d4e05798e9dc2435ae41 /src/code/listalloc.c | |
| parent | 34492a4386446fc82220fe0684ff521d760e84bd (diff) | |
Organize `libc64` files (#1492)
* Move qrand to libc64
* use an union to avoid type punning
* __osMalloc
* math64.c
* fixed_point.h
* sleep
* aprintf.h
* sprintf
* malloc
* use original names on aprintf.c and malloc.c
* qrand cleanup pass
* use original names of sleep.c
* og names for sprintf
* more cleanup
* format
* fixes
* whoops
* use ARRAY_COUNT again
* comment
* Use `fu`
* forgot this one
* review
* fix
* sneak a tiny cleanup
Diffstat (limited to 'src/code/listalloc.c')
| -rw-r--r-- | src/code/listalloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/code/listalloc.c b/src/code/listalloc.c index ba346d954..e6b62eef5 100644 --- a/src/code/listalloc.c +++ b/src/code/listalloc.c @@ -1,5 +1,5 @@ #include "listalloc.h" -#include "system_malloc.h" +#include "libc64/malloc.h" ListAlloc* ListAlloc_Init(ListAlloc* this) { this->prev = NULL; @@ -8,7 +8,7 @@ ListAlloc* ListAlloc_Init(ListAlloc* this) { } void* ListAlloc_Alloc(ListAlloc* this, size_t size) { - ListAlloc* ptr = SystemArena_Malloc(size + sizeof(ListAlloc)); + ListAlloc* ptr = malloc(size + sizeof(ListAlloc)); ListAlloc* next; if (ptr == NULL) { @@ -50,7 +50,7 @@ void ListAlloc_Free(ListAlloc* this, void* data) { this->next = ptr->prev; } - SystemArena_Free(ptr); + free(ptr); } void ListAlloc_FreeAll(ListAlloc* this) { |
