diff options
author | bunnei <bunneidev@gmail.com> | 2019-03-28 22:56:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-28 22:56:49 +0100 |
commit | 16dc3a1dd5b3a8a70de833aa1da98fc6ed8bacce (patch) | |
tree | cfe1d18ac3392175d32306b5f73d3a764fb68e9b /src/core/hle/kernel/svc.cpp | |
parent | Merge pull request #2296 from lioncash/override (diff) | |
parent | kernel/vm_manager: Handle shrinking of the heap size within SetHeapSize() (diff) | |
download | yuzu-16dc3a1dd5b3a8a70de833aa1da98fc6ed8bacce.tar yuzu-16dc3a1dd5b3a8a70de833aa1da98fc6ed8bacce.tar.gz yuzu-16dc3a1dd5b3a8a70de833aa1da98fc6ed8bacce.tar.bz2 yuzu-16dc3a1dd5b3a8a70de833aa1da98fc6ed8bacce.tar.lz yuzu-16dc3a1dd5b3a8a70de833aa1da98fc6ed8bacce.tar.xz yuzu-16dc3a1dd5b3a8a70de833aa1da98fc6ed8bacce.tar.zst yuzu-16dc3a1dd5b3a8a70de833aa1da98fc6ed8bacce.zip |
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index e5e7f99e1..09d1eadb6 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -175,11 +175,8 @@ static ResultCode SetHeapSize(VAddr* heap_addr, u64 heap_size) { return ERR_INVALID_SIZE; } - auto& vm_manager = Core::CurrentProcess()->VMManager(); - const VAddr heap_base = vm_manager.GetHeapRegionBaseAddress(); - const auto alloc_result = - vm_manager.HeapAllocate(heap_base, heap_size, VMAPermission::ReadWrite); - + auto& vm_manager = Core::System::GetInstance().Kernel().CurrentProcess()->VMManager(); + const auto alloc_result = vm_manager.SetHeapSize(heap_size); if (alloc_result.Failed()) { return alloc_result.Code(); } @@ -809,7 +806,7 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id) return RESULT_SUCCESS; case GetInfoType::TotalHeapUsage: - *result = process->VMManager().GetTotalHeapUsage(); + *result = process->VMManager().GetCurrentHeapSize(); return RESULT_SUCCESS; case GetInfoType::IsVirtualAddressMemoryEnabled: |