From fc475a97565ade34d57f80970c6b5cebcc2892a7 Mon Sep 17 00:00:00 2001 From: Derek Hensley Date: Sun, 28 May 2023 20:04:07 -0700 Subject: Docs Cleanup (#1153) * sysheap * Gorons * Update goron comment * functions.h * Update src/boot_O2/system_heap.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * add header * Fix header guards * Update data * Add malloc and free to header --------- Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> --- include/functions.h | 4 ---- include/system_heap.h | 11 +++++++++++ include/system_malloc.h | 6 +++--- 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 include/system_heap.h (limited to 'include') diff --git a/include/functions.h b/include/functions.h index bcc79f9e5..0f99fb24b 100644 --- a/include/functions.h +++ b/include/functions.h @@ -128,10 +128,6 @@ void MtxConv_L2F(MtxF* mtx, Mtx* mf); void __assert(const char* file, u32 lineNum); // void func_800862B4(void); -void* SystemArena_MallocMin1(u32 size); -void SystemArena_FreeNullCheck(void* ptr); -void SystemArena_RunInits(void); -void SystemArena_Init(void* start, size_t size); s32 func_80086620(OSMesgQueue* param_1, PadMgr* param_2, OSContStatus* param_3); f32 func_80086760(f32 x); // void func_80086794(void); diff --git a/include/system_heap.h b/include/system_heap.h new file mode 100644 index 000000000..e0864cca6 --- /dev/null +++ b/include/system_heap.h @@ -0,0 +1,11 @@ +#ifndef SYSTEM_HEAP_H +#define SYSTEM_HEAP_H + +#include "libc/stddef.h" +#include "PR/ultratypes.h" + +void* SystemHeap_Malloc(size_t size); +void SystemHeap_Free(void* ptr); +void SystemHeap_Init(void* start, size_t size); + +#endif diff --git a/include/system_malloc.h b/include/system_malloc.h index e92eaf89f..cf91899ef 100644 --- a/include/system_malloc.h +++ b/include/system_malloc.h @@ -1,5 +1,5 @@ -#ifndef SYSTEM_MALLOC -#define SYSTEM_MALLOC +#ifndef SYSTEM_MALLOC_H +#define SYSTEM_MALLOC_H #include "PR/ultratypes.h" #include "os_malloc.h" @@ -11,7 +11,7 @@ void SystemArena_Free(void* ptr); void* SystemArena_Calloc(u32 elements, size_t size); void SystemArena_GetSizes(size_t* maxFreeBlock, size_t* bytesFree, size_t* bytesAllocated); u32 SystemArena_CheckArena(void); -void SystemArena_InitArena(void* start, size_t size); +void SystemArena_Init(void* start, size_t size); void SystemArena_Cleanup(void); u8 SystemArena_IsInitialized(void); -- cgit v1.2.3