Moved Heaps_Free outside Main after DeinitOTR, and mirrored Heaps_Alloc before and outside of Main. (#3279)

This commit is contained in:
Malkierian 2023-10-19 20:36:52 -07:00 committed by GitHub
parent c3784b9758
commit 35b4357776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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