summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Subv2016-04-19 15:56:11 -0500
committerGravatar Subv2016-05-12 20:01:59 -0500
commitd261984f5460ca700c372299df64d47f32e199b9 (patch)
tree7529ed91491dde2b7864fbd9eb68ff3682a93caf /src/core
parentAPT: Move the shared font loading and relocation functions to their own subdi... (diff)
downloadyuzu-d261984f5460ca700c372299df64d47f32e199b9.tar.gz
yuzu-d261984f5460ca700c372299df64d47f32e199b9.tar.xz
yuzu-d261984f5460ca700c372299df64d47f32e199b9.zip
Kernel: Account for automatically-allocated shared memories in the amount of used linear heap memory.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/kernel/shared_memory.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp
index 2b6007caa..74947f023 100644
--- a/src/core/hle/kernel/shared_memory.cpp
+++ b/src/core/hle/kernel/shared_memory.cpp
@@ -41,6 +41,11 @@ SharedPtr<SharedMemory> SharedMemory::Create(SharedPtr<Process> owner_process, u
41 41
42 shared_memory->linear_heap_phys_address = Memory::FCRAM_PADDR + memory_region->base + shared_memory->backing_block_offset; 42 shared_memory->linear_heap_phys_address = Memory::FCRAM_PADDR + memory_region->base + shared_memory->backing_block_offset;
43 43
44 // Increase the amount of used linear heap memory for the owner process.
45 if (shared_memory->owner_process != nullptr) {
46 shared_memory->owner_process->linear_heap_used += size;
47 }
48
44 // Refresh the address mappings for the current process. 49 // Refresh the address mappings for the current process.
45 if (Kernel::g_current_process != nullptr) { 50 if (Kernel::g_current_process != nullptr) {
46 Kernel::g_current_process->vm_manager.RefreshMemoryBlockMappings(linheap_memory.get()); 51 Kernel::g_current_process->vm_manager.RefreshMemoryBlockMappings(linheap_memory.get());