diff options
author | bunnei <bunneidev@gmail.com> | 2020-06-14 06:44:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-14 06:44:34 +0200 |
commit | 89d11f22680d81d8b036a87c206a30defec3fe89 (patch) | |
tree | 520391440e1c1bbc64cfb4a90888a774127af99d /src/core/hle | |
parent | Merge pull request #4064 from ReinUsesLisp/invalidate-buffers (diff) | |
parent | kernel: Account for system resource size for memory usage (diff) | |
download | yuzu-89d11f22680d81d8b036a87c206a30defec3fe89.tar yuzu-89d11f22680d81d8b036a87c206a30defec3fe89.tar.gz yuzu-89d11f22680d81d8b036a87c206a30defec3fe89.tar.bz2 yuzu-89d11f22680d81d8b036a87c206a30defec3fe89.tar.lz yuzu-89d11f22680d81d8b036a87c206a30defec3fe89.tar.xz yuzu-89d11f22680d81d8b036a87c206a30defec3fe89.tar.zst yuzu-89d11f22680d81d8b036a87c206a30defec3fe89.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/kernel/process.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 36724569f..c4c5199b1 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp @@ -132,7 +132,8 @@ std::shared_ptr<ResourceLimit> Process::GetResourceLimit() const { u64 Process::GetTotalPhysicalMemoryAvailable() const { const u64 capacity{resource_limit->GetCurrentResourceValue(ResourceType::PhysicalMemory) + - page_table->GetTotalHeapSize() + image_size + main_thread_stack_size}; + page_table->GetTotalHeapSize() + GetSystemResourceSize() + image_size + + main_thread_stack_size}; if (capacity < memory_usage_capacity) { return capacity; @@ -146,7 +147,8 @@ u64 Process::GetTotalPhysicalMemoryAvailableWithoutSystemResource() const { } u64 Process::GetTotalPhysicalMemoryUsed() const { - return image_size + main_thread_stack_size + page_table->GetTotalHeapSize(); + return image_size + main_thread_stack_size + page_table->GetTotalHeapSize() + + GetSystemResourceSize(); } u64 Process::GetTotalPhysicalMemoryUsedWithoutSystemResource() const { |