diff options
author | Lioncash <mathew1800@gmail.com> | 2019-03-24 21:05:25 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-03-24 22:08:30 +0100 |
commit | abdb81ccaf9e32c8b605af690922599d974a3ee7 (patch) | |
tree | c19fc95fe3c1d4103322afba8e5eedb8d288168f /src/core/hle | |
parent | kernel/vm_manager: Remove unused class variables (diff) | |
download | yuzu-abdb81ccaf9e32c8b605af690922599d974a3ee7.tar yuzu-abdb81ccaf9e32c8b605af690922599d974a3ee7.tar.gz yuzu-abdb81ccaf9e32c8b605af690922599d974a3ee7.tar.bz2 yuzu-abdb81ccaf9e32c8b605af690922599d974a3ee7.tar.lz yuzu-abdb81ccaf9e32c8b605af690922599d974a3ee7.tar.xz yuzu-abdb81ccaf9e32c8b605af690922599d974a3ee7.tar.zst yuzu-abdb81ccaf9e32c8b605af690922599d974a3ee7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/vm_manager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index 04d58bbf7..16f48471e 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp @@ -261,6 +261,11 @@ ResultVal<VAddr> VMManager::HeapAllocate(u64 size) { return ERR_OUT_OF_MEMORY; } + // No need to do any additional work if the heap is already the given size. + if (size == GetCurrentHeapSize()) { + return MakeResult(heap_region_base); + } + if (heap_memory == nullptr) { // Initialize heap heap_memory = std::make_shared<std::vector<u8>>(size); |