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.
This commit is contained in:
Billy Laws 2020-07-06 12:18:37 +01:00 committed by ◱ PixelyIon
parent f1a28f7a1c
commit 2f8a217204

View File

@ -664,7 +664,7 @@ namespace skyline::kernel::svc {
break; break;
case constant::infoState::TotalMemoryUsage: 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; break;
case constant::infoState::AddressSpaceBaseAddr: case constant::infoState::AddressSpaceBaseAddr: