Fix memory leaks; Adjust heap & thread stack size (#47)
This commit is contained in:
@@ -132,7 +132,7 @@ void FileUtils::RefreshFlags(bool force)
|
||||
void FileUtils::InitializeAsync()
|
||||
{
|
||||
Thread initThread = {0};
|
||||
threadCreate(&initThread, _FileUtils_InitializeThreadFunc, NULL, NULL, 0x4000, 0x15, 0);
|
||||
threadCreate(&initThread, _FileUtils_InitializeThreadFunc, NULL, NULL, 0x2000, 0x15, 0);
|
||||
threadStart(&initThread);
|
||||
}
|
||||
|
||||
@@ -228,6 +228,7 @@ void FileUtils::ParseLoaderKip() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
closedir(dp);
|
||||
}
|
||||
delete[] full_path;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ IpcService::IpcService()
|
||||
ASSERT_RESULT_OK(rc, "svcGetThreadPriority");
|
||||
rc = ipcServerInit(&this->server, SYSCLK_IPC_SERVICE_NAME, 42);
|
||||
ASSERT_RESULT_OK(rc, "ipcServerInit");
|
||||
rc = threadCreate(&this->thread, &IpcService::ProcessThreadFunc, this, NULL, 0x2000, priority, -2);
|
||||
rc = threadCreate(&this->thread, &IpcService::ProcessThreadFunc, this, NULL, 0x1000, priority, -2);
|
||||
ASSERT_RESULT_OK(rc, "threadCreate");
|
||||
this->running = false;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "ipc_service.h"
|
||||
#include "oc_extra.h"
|
||||
|
||||
#define INNER_HEAP_SIZE 0x40000
|
||||
#define INNER_HEAP_SIZE 0x50000
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -170,12 +170,12 @@ void Governor::Start() {
|
||||
s->self = this;
|
||||
s->id = core;
|
||||
int prio = (core == CORE_NUMS - 1) ? 0x3F : 0x3B; // Pre-emptive MT
|
||||
rc = threadCreate(&m_t_cpuworker[core], &CpuUtilWorker, (void*)s, NULL, 0x1000, prio, core);
|
||||
rc = threadCreate(&m_t_cpuworker[core], &CpuUtilWorker, (void*)s, NULL, 0x400, prio, core);
|
||||
ASSERT_RESULT_OK(rc, "threadCreate");
|
||||
rc = threadStart(&m_t_cpuworker[core]);
|
||||
ASSERT_RESULT_OK(rc, "threadStart");
|
||||
}
|
||||
rc = threadCreate(&m_t_main, &Main, (void*)this, NULL, 0x1000, 0x3F, 3);
|
||||
rc = threadCreate(&m_t_main, &Main, (void*)this, NULL, 0x400, 0x3F, 3);
|
||||
ASSERT_RESULT_OK(rc, "threadCreate");
|
||||
rc = threadStart(&m_t_main);
|
||||
ASSERT_RESULT_OK(rc, "threadStart");
|
||||
|
||||
Reference in New Issue
Block a user