Skip to content

Commit bcda207

Browse files
committed
3DS: Reduce autosave thread stack size
It was unnecessarily large and seemed to sometimes trigger an edge case in newlib's heap handling, leading to an infinite loop when trying to merge heap bins. It seems to be a super-specific edge-case of when these bins merge, so it's really hard to tell if it is a newlib bug or not.
1 parent 18dd97c commit bcda207

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/platform/3ds/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ int main(int argc, char* argv[]) {
10661066
ConditionInit(&runner.autosave.cond);
10671067

10681068
APT_SetAppCpuTimeLimit(20);
1069-
runner.autosave.thread = threadCreate(mGUIAutosaveThread, &runner.autosave, 0x4000, 0x1F, 1, true);
1069+
runner.autosave.thread = threadCreate(mGUIAutosaveThread, &runner.autosave, 0x2000, 0x1F, 1, true);
10701070

10711071
Thread thread2;
10721072
if (ThreadCreate(&thread2, _core2Test, NULL) == 0) {

0 commit comments

Comments
 (0)