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(); }