diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2023-08-09 20:45:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-09 20:45:25 -0400 |
| commit | cfa703f013a1e595a418e47ac05df06e9ae4f9b8 (patch) | |
| tree | 6f22ff1f665ac5dfd8f62b321895f846af4bfab5 /include | |
| parent | bd0c96e41818de39d243604f2a56bdee779956f2 (diff) | |
`malloc.c` (#42)
* malloc
* match
* bss
* Fix naming
* move __osMalloc to libc64 folder
* move headers to libc64 folder
Diffstat (limited to 'include')
| -rw-r--r-- | include/boot_variables.h | 1 | ||||
| -rw-r--r-- | include/libc64/malloc.h | 17 | ||||
| -rw-r--r-- | include/libc64/osmalloc.h (renamed from include/osmalloc.h) | 0 | ||||
| -rw-r--r-- | include/malloc.h | 17 |
4 files changed, 17 insertions, 18 deletions
diff --git a/include/boot_variables.h b/include/boot_variables.h index 577b212..c85f519 100644 --- a/include/boot_variables.h +++ b/include/boot_variables.h @@ -281,7 +281,6 @@ extern OSPiHandle* gCartHandle; // TODO: Determine where this goes // extern UNK_TYPE B_80041995_jp; // extern UNK_TYPE B_80041998_jp; -// extern UNK_TYPE B_800419C0_jp; // extern UNK_TYPE B_800419F0_jp; // extern UNK_TYPE B_80044684_jp; diff --git a/include/libc64/malloc.h b/include/libc64/malloc.h new file mode 100644 index 0000000..47367a3 --- /dev/null +++ b/include/libc64/malloc.h @@ -0,0 +1,17 @@ +#ifndef MALLOC_H +#define MALLOC_H + +#include "ultra64.h" + +void* malloc(size_t size); +void* malloc_r(size_t size); +void* realloc(void* ptr, size_t size); +void free(void* ptr); +void* calloc(s32 num, size_t size); +void GetFreeArena(size_t* outMaxFree, size_t* outFree, size_t* outAlloc); +s32 CheckArena(void); +void MallocInit(void* heap, size_t size); +void MallocCleanup(void); +s32 MallocIsInitialized(void); + +#endif diff --git a/include/osmalloc.h b/include/libc64/osmalloc.h index 9be9095..9be9095 100644 --- a/include/osmalloc.h +++ b/include/libc64/osmalloc.h diff --git a/include/malloc.h b/include/malloc.h deleted file mode 100644 index dfc2bc4..0000000 --- a/include/malloc.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef MALLOC_H -#define MALLOC_H - -#include "ultra64.h" - -void* malloc(size_t size); -void* malloc_r(size_t size); -// void realloc(); -void free(void* ptr); -// void calloc(); -// void DisplayArena(); -// void GetFreeArena(); -// void MallocInit(); -// void MallocCleanup(); -// void MallocIsInitialized(); - -#endif |
