From 35b4357776cec4d042359a6787dad59744e4cd88 Mon Sep 17 00:00:00 2001 From: Malkierian Date: Thu, 19 Oct 2023 20:36:52 -0700 Subject: [PATCH] Moved `Heaps_Free` outside `Main` after DeinitOTR, and mirrored `Heaps_Alloc` before and outside of `Main`. (#3279) --- soh/src/code/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/soh/src/code/main.c b/soh/src/code/main.c index b59a825c1..9d52833fd 100644 --- a/soh/src/code/main.c +++ b/soh/src/code/main.c @@ -65,8 +65,10 @@ int main(int argc, char** argv) CrashHandlerRegisterCallback(CrashHandler_PrintSohData); BootCommands_Init(); + Heaps_Alloc(); Main(0); DeinitOTR(); + Heaps_Free(); return 0; } @@ -87,7 +89,6 @@ void Main(void* arg) { PreNmiBuff_Init(gAppNmiBufferPtr); Fault_Init(); SysCfb_Init(0); - Heaps_Alloc(); sysHeap = (uintptr_t)gSystemHeap; fb = SysCfb_GetFbPtr(0); gSystemHeapSize = 1024 * 1024 * 4; @@ -156,6 +157,4 @@ void Main(void* arg) { osDestroyThread(&sGraphThread); func_800FBFD8(); osSyncPrintf("mainproc 実行終了\n"); // "End of execution" - - Heaps_Free(); }