diff options
Diffstat (limited to 'src/core/hle/kernel/vm_manager.cpp')
-rw-r--r-- | src/core/hle/kernel/vm_manager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index 9385a8697..bda325e87 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp @@ -349,7 +349,7 @@ ResultCode VMManager::MapPhysicalMemory(VAddr target, u64 size) { } // Check that we can map the memory we want. - const auto res_limit = Core::CurrentProcess()->GetResourceLimit(); + const auto res_limit = system.CurrentProcess()->GetResourceLimit(); const u64 physmem_remaining = res_limit->GetMaxResourceValue(ResourceType::PhysicalMemory) - res_limit->GetCurrentResourceValue(ResourceType::PhysicalMemory); if (physmem_remaining < (size - mapped_size)) { @@ -558,6 +558,9 @@ ResultCode VMManager::UnmapPhysicalMemory(VAddr target, u64 size) { } } + // Update mapped amount + physical_memory_mapped -= mapped_size; + return RESULT_SUCCESS; } |