From 2f8a21720408996c54ce81565980f9d46b55d351 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Mon, 6 Jul 2020 12:18:37 +0100 Subject: [PATCH] Use the heap size rather than the heap address when calculating the total memory usage Without this fix allocations are broken in Puyo Puyo Tetris. --- app/src/main/cpp/skyline/kernel/svc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/kernel/svc.cpp b/app/src/main/cpp/skyline/kernel/svc.cpp index b43c7a57..1f45ade2 100644 --- a/app/src/main/cpp/skyline/kernel/svc.cpp +++ b/app/src/main/cpp/skyline/kernel/svc.cpp @@ -664,7 +664,7 @@ namespace skyline::kernel::svc { break; case constant::infoState::TotalMemoryUsage: - out = state.process->heap->address + constant::DefStackSize + state.os->memory.GetProgramSize(); + out = state.process->heap->size + constant::DefStackSize + state.os->memory.GetProgramSize(); break; case constant::infoState::AddressSpaceBaseAddr: