diff options
author | Michael Scire <SciresM@gmail.com> | 2019-07-07 20:48:11 +0200 |
---|---|---|
committer | Michael Scire <SciresM@gmail.com> | 2019-07-07 20:48:11 +0200 |
commit | 1689784c198f6a7f3c389d4cd5edeccc74c1d9f3 (patch) | |
tree | 66fed74508274f801f37e08d5bc405227776cf4c /src/core/hle/kernel/vm_manager.cpp | |
parent | Implement MapPhysicalMemory/UnmapPhysicalMemory (diff) | |
download | yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar.gz yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar.bz2 yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar.lz yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar.xz yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.tar.zst yuzu-1689784c198f6a7f3c389d4cd5edeccc74c1d9f3.zip |
Diffstat (limited to '')
-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; } |