summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/memory
diff options
context:
space:
mode:
authorChloe Marcec <dmarcecguzman@gmail.com>2021-02-03 02:55:16 +0100
committerChloe Marcec <dmarcecguzman@gmail.com>2021-02-03 02:55:16 +0100
commit2c6e94049362f592bfb578a2b078f6f3067ed0d8 (patch)
tree513aa888bfe87637e8736165b35b852de079b02f /src/core/hle/kernel/memory
parentCompile error (diff)
downloadyuzu-2c6e94049362f592bfb578a2b078f6f3067ed0d8.tar
yuzu-2c6e94049362f592bfb578a2b078f6f3067ed0d8.tar.gz
yuzu-2c6e94049362f592bfb578a2b078f6f3067ed0d8.tar.bz2
yuzu-2c6e94049362f592bfb578a2b078f6f3067ed0d8.tar.lz
yuzu-2c6e94049362f592bfb578a2b078f6f3067ed0d8.tar.xz
yuzu-2c6e94049362f592bfb578a2b078f6f3067ed0d8.tar.zst
yuzu-2c6e94049362f592bfb578a2b078f6f3067ed0d8.zip
Diffstat (limited to 'src/core/hle/kernel/memory')
-rw-r--r--src/core/hle/kernel/memory/page_table.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/hle/kernel/memory/page_table.cpp b/src/core/hle/kernel/memory/page_table.cpp
index d8c7d980a..7de91c768 100644
--- a/src/core/hle/kernel/memory/page_table.cpp
+++ b/src/core/hle/kernel/memory/page_table.cpp
@@ -413,8 +413,8 @@ ResultCode PageTable::MapPhysicalMemory(VAddr addr, std::size_t size) {
const std::size_t remaining_size{size - mapped_size};
const std::size_t remaining_pages{remaining_size / PageSize};
- if (process->GetResourceLimit() && !process->GetResourceLimit()->Reserve(
- LimitableResource::PhysicalMemoryMax, remaining_size)) {
+ if (process->GetResourceLimit() &&
+ !process->GetResourceLimit()->Reserve(LimitableResource::PhysicalMemory, remaining_size)) {
return ERR_RESOURCE_LIMIT_EXCEEDED;
}
@@ -422,8 +422,7 @@ ResultCode PageTable::MapPhysicalMemory(VAddr addr, std::size_t size) {
{
auto block_guard = detail::ScopeExit([&] {
system.Kernel().MemoryManager().Free(page_linked_list, remaining_pages, memory_pool);
- process->GetResourceLimit()->Release(LimitableResource::PhysicalMemoryMax,
- remaining_size);
+ process->GetResourceLimit()->Release(LimitableResource::PhysicalMemory, remaining_size);
});
CASCADE_CODE(system.Kernel().MemoryManager().Allocate(page_linked_list, remaining_pages,
@@ -475,7 +474,7 @@ ResultCode PageTable::UnmapPhysicalMemory(VAddr addr, std::size_t size) {
CASCADE_CODE(UnmapMemory(addr, size));
auto process{system.Kernel().CurrentProcess()};
- process->GetResourceLimit()->Release(LimitableResource::PhysicalMemoryMax, mapped_size);
+ process->GetResourceLimit()->Release(LimitableResource::PhysicalMemory, mapped_size);
physical_memory_usage -= mapped_size;
return RESULT_SUCCESS;
@@ -784,7 +783,7 @@ ResultVal<VAddr> PageTable::SetHeapSize(std::size_t size) {
auto process{system.Kernel().CurrentProcess()};
if (process->GetResourceLimit() && delta != 0 &&
- !process->GetResourceLimit()->Reserve(LimitableResource::PhysicalMemoryMax, delta)) {
+ !process->GetResourceLimit()->Reserve(LimitableResource::PhysicalMemory, delta)) {
return ERR_RESOURCE_LIMIT_EXCEEDED;
}