address review commentary

This commit is contained in:
Michael Scire
2019-07-07 11:48:11 -07:00
parent 13a8fde3ad
commit 1689784c19
5 changed files with 42 additions and 36 deletions

View File

@ -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;
}