1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-12 10:54:44 +00:00

[headers 14] libc64 headers (#2177)

* [headers 14] libc64 headers

* bss

* bss
This commit is contained in:
Dragorn421 2024-09-11 11:02:42 +02:00 committed by GitHub
parent cbf9eacf42
commit 76d97ac18a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 73 additions and 40 deletions

28
include/libc64/malloc.h Normal file
View file

@ -0,0 +1,28 @@
#ifndef LIBC64_MALLOC_H
#define LIBC64_MALLOC_H
#include "ultra64.h"
#include "libc64/os_malloc.h"
void* SystemArena_Malloc(u32 size);
void* SystemArena_MallocR(u32 size);
void* SystemArena_Realloc(void* ptr, u32 newSize);
void SystemArena_Free(void* ptr);
void* SystemArena_Calloc(u32 num, u32 size);
void SystemArena_GetSizes(u32* outMaxFree, u32* outFree, u32* outAlloc);
void SystemArena_Check(void);
void SystemArena_Init(void* start, u32 size);
void SystemArena_Cleanup(void);
s32 SystemArena_IsInitialized(void);
#if OOT_DEBUG
void* SystemArena_MallocDebug(u32 size, const char* file, int line);
void* SystemArena_MallocRDebug(u32 size, const char* file, int line);
void* SystemArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line);
void SystemArena_FreeDebug(void* ptr, const char* file, int line);
void SystemArena_Display(void);
#endif
extern Arena gSystemArena;
#endif