diff options
| author | cadmic <cadmic24@gmail.com> | 2024-09-04 02:10:14 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-04 11:10:14 +0200 |
| commit | c6d7cc7697c67989b1f018ae2bc934f6677c09b7 (patch) | |
| tree | cadb909a8c2adde978320b8505fc1bda48e3342c /src/code/system_malloc.c | |
| parent | af24970d8919e4e6bb8356fd5672c938582dfcb8 (diff) | |
[ntsc-1.2] Match __osMalloc.c and code_800FC620.c (new/delete) (#2106)
* Match __osMalloc
* Match src/code/code_800FC620.c (new/delete)
* Wrap versions-specific files in ifdefs to fix compilation
* Fix bss
* Remove {FAULT,RAND,OSMALLOC}_VERSION in favor of PLATFORM_N64
* Fix __osMalloc data splits, add unused strings
* __osMalloc.h -> osMalloc.h
* Fix merge
Diffstat (limited to 'src/code/system_malloc.c')
| -rw-r--r-- | src/code/system_malloc.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/code/system_malloc.c b/src/code/system_malloc.c index 8385a883c..de6a56b30 100644 --- a/src/code/system_malloc.c +++ b/src/code/system_malloc.c @@ -1,4 +1,5 @@ #include "global.h" +#include "osMalloc.h" #define LOG_SEVERITY_NOLOG 0 #define LOG_SEVERITY_ERROR 2 @@ -6,16 +7,6 @@ Arena gSystemArena; -#if PLATFORM_N64 -#define DECLARE_INTERRUPT_MASK OSIntMask __mask; -#define DISABLE_INTERRUPTS() __mask = osSetIntMask(OS_IM_NONE) -#define RESTORE_INTERRUPTS() osSetIntMask(__mask) -#else -#define DECLARE_INTERRUPT_MASK -#define DISABLE_INTERRUPTS() (void)0 -#define RESTORE_INTERRUPTS() (void)0 -#endif - #if OOT_DEBUG s32 gSystemArenaLogSeverity = LOG_SEVERITY_NOLOG; @@ -176,6 +167,6 @@ void SystemArena_Cleanup(void) { __osMallocCleanup(&gSystemArena); } -u8 SystemArena_IsInitialized(void) { +s32 SystemArena_IsInitialized(void) { return __osMallocIsInitialized(&gSystemArena); } |
