summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2019-03-28 22:59:17 -0400
committerGravatar Lioncash2019-03-28 22:59:20 -0400
commit3a846aa80f5d533a5061fcbef2736aaef8c38a66 (patch)
treea3dd29dfc5f35a4fed9d9c9855af4dbab902774f /src/core/hle/kernel/svc.cpp
parentkernel/process: Store the total size of the code memory loaded (diff)
downloadyuzu-3a846aa80f5d533a5061fcbef2736aaef8c38a66.tar.gz
yuzu-3a846aa80f5d533a5061fcbef2736aaef8c38a66.tar.xz
yuzu-3a846aa80f5d533a5061fcbef2736aaef8c38a66.zip
kernel/process: Report total physical memory used to svcGetInfo
Reports the (mostly) correct size through svcGetInfo now for queries to total used physical memory. This still doesn't correctly handle memory allocated via svcMapPhysicalMemory, however, we don't currently handle that case anyways.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 09d1eadb6..17bfe10ff 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -709,7 +709,7 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
709 HeapRegionBaseAddr = 4, 709 HeapRegionBaseAddr = 4,
710 HeapRegionSize = 5, 710 HeapRegionSize = 5,
711 TotalMemoryUsage = 6, 711 TotalMemoryUsage = 6,
712 TotalHeapUsage = 7, 712 TotalPhysicalMemoryUsed = 7,
713 IsCurrentProcessBeingDebugged = 8, 713 IsCurrentProcessBeingDebugged = 8,
714 RegisterResourceLimit = 9, 714 RegisterResourceLimit = 9,
715 IdleTickCount = 10, 715 IdleTickCount = 10,
@@ -745,7 +745,7 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
745 case GetInfoType::NewMapRegionBaseAddr: 745 case GetInfoType::NewMapRegionBaseAddr:
746 case GetInfoType::NewMapRegionSize: 746 case GetInfoType::NewMapRegionSize:
747 case GetInfoType::TotalMemoryUsage: 747 case GetInfoType::TotalMemoryUsage:
748 case GetInfoType::TotalHeapUsage: 748 case GetInfoType::TotalPhysicalMemoryUsed:
749 case GetInfoType::IsVirtualAddressMemoryEnabled: 749 case GetInfoType::IsVirtualAddressMemoryEnabled:
750 case GetInfoType::PersonalMmHeapUsage: 750 case GetInfoType::PersonalMmHeapUsage:
751 case GetInfoType::TitleId: 751 case GetInfoType::TitleId:
@@ -805,8 +805,8 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
805 *result = process->VMManager().GetTotalMemoryUsage(); 805 *result = process->VMManager().GetTotalMemoryUsage();
806 return RESULT_SUCCESS; 806 return RESULT_SUCCESS;
807 807
808 case GetInfoType::TotalHeapUsage: 808 case GetInfoType::TotalPhysicalMemoryUsed:
809 *result = process->VMManager().GetCurrentHeapSize(); 809 *result = process->GetTotalPhysicalMemoryUsed();
810 return RESULT_SUCCESS; 810 return RESULT_SUCCESS;
811 811
812 case GetInfoType::IsVirtualAddressMemoryEnabled: 812 case GetInfoType::IsVirtualAddressMemoryEnabled: