From c1a8f684df76afc9d1b450da97e504b8d9d65a97 Mon Sep 17 00:00:00 2001
From: Lioncash <mathew1800@gmail.com>
Date: Sun, 9 Jun 2019 18:12:02 -0400
Subject: [PATCH] kernel/svc: Amend naming for TotalMemoryUsage in svcGetInfo()

Disambiguates and makes the name a little more consistent with
TotalPhysicalMemoryUsed.
---
 src/core/hle/kernel/svc.cpp        | 8 ++++----
 src/core/hle/kernel/vm_manager.cpp | 2 +-
 src/core/hle/kernel/vm_manager.h   | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 1f8b0d92b6..377a9bf483 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -710,7 +710,7 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, u64 ha
         MapRegionSize = 3,
         HeapRegionBaseAddr = 4,
         HeapRegionSize = 5,
-        TotalMemoryUsage = 6,
+        TotalPhysicalMemoryAvailable = 6,
         TotalPhysicalMemoryUsed = 7,
         IsCurrentProcessBeingDebugged = 8,
         RegisterResourceLimit = 9,
@@ -745,7 +745,7 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, u64 ha
     case GetInfoType::ASLRRegionSize:
     case GetInfoType::NewMapRegionBaseAddr:
     case GetInfoType::NewMapRegionSize:
-    case GetInfoType::TotalMemoryUsage:
+    case GetInfoType::TotalPhysicalMemoryAvailable:
     case GetInfoType::TotalPhysicalMemoryUsed:
     case GetInfoType::IsVirtualAddressMemoryEnabled:
     case GetInfoType::PersonalMmHeapUsage:
@@ -803,8 +803,8 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, u64 ha
             *result = process->VMManager().GetNewMapRegionSize();
             return RESULT_SUCCESS;
 
-        case GetInfoType::TotalMemoryUsage:
-            *result = process->VMManager().GetTotalMemoryUsage();
+        case GetInfoType::TotalPhysicalMemoryAvailable:
+            *result = process->VMManager().GetTotalPhysicalMemoryAvailable();
             return RESULT_SUCCESS;
 
         case GetInfoType::TotalPhysicalMemoryUsed:
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp
index 48b13cfdd4..6d6980abad 100644
--- a/src/core/hle/kernel/vm_manager.cpp
+++ b/src/core/hle/kernel/vm_manager.cpp
@@ -758,7 +758,7 @@ VMManager::CheckResults VMManager::CheckRangeState(VAddr address, u64 size, Memo
         std::make_tuple(initial_state, initial_permissions, initial_attributes & ~ignore_mask));
 }
 
-u64 VMManager::GetTotalMemoryUsage() const {
+u64 VMManager::GetTotalPhysicalMemoryAvailable() const {
     LOG_WARNING(Kernel, "(STUBBED) called");
     return 0xF8000000;
 }
diff --git a/src/core/hle/kernel/vm_manager.h b/src/core/hle/kernel/vm_manager.h
index ec84d9a709..dfbf7a8941 100644
--- a/src/core/hle/kernel/vm_manager.h
+++ b/src/core/hle/kernel/vm_manager.h
@@ -499,7 +499,7 @@ public:
     void LogLayout() const;
 
     /// Gets the total memory usage, used by svcGetInfo
-    u64 GetTotalMemoryUsage() const;
+    u64 GetTotalPhysicalMemoryAvailable() const;
 
     /// Gets the address space base address
     VAddr GetAddressSpaceBaseAddress() const;
-- 
GitLab