__osMalloc.c OK (#395)

* __osRealloc

* match __osCheckArena

* cleanup

* Import bss, unreferenced strings and cleanup

* format

* Reviews

* Move convert.h to ultra64/

* Make the os_malloc.h header

* potato

* renames and fixes

* format

* small doc pass
}

* format

* minor changes

* Introduce system_malloc.h

* Docs pass

* fix

* format

* stuff

* Apply suggestions from code review

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>

* review

* format

* remove repeated sentence

* Apply suggestions from code review

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* include headers

* review

* Rename __osMallocAddHeap

* remove @brief

* Update src/boot_O2/__osMalloc.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
Anghelo Carvajal
2022-01-11 20:25:14 -03:00
committed by GitHub
parent 133e02a8a7
commit c44e26a143
28 changed files with 376 additions and 135 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
#include "global.h"
#include "os_malloc.h"
Arena gSystemArena;
@@ -29,8 +30,8 @@ void* SystemArena_Calloc(u32 elements, size_t size) {
return ptr;
}
void SystemArena_AnalyzeArena(size_t* maxFreeBlock, size_t* bytesFree, size_t* bytesAllocated) {
__osAnalyzeArena(&gSystemArena, maxFreeBlock, bytesFree, bytesAllocated);
void SystemArena_GetSizes(size_t* maxFreeBlock, size_t* bytesFree, size_t* bytesAllocated) {
__osGetSizes(&gSystemArena, maxFreeBlock, bytesFree, bytesAllocated);
}
u32 SystemArena_CheckArena(void) {