diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-16 23:24:29 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-03-16 23:32:25 +0100 |
commit | e9a857ce82e85c3933f6ce3140ba366e932db386 (patch) | |
tree | f40d3990e9194180d378c1d25a484d9be93e96f5 /src | |
parent | arm_interface: Support unmapping previously mapped memory. (diff) | |
download | yuzu-e9a857ce82e85c3933f6ce3140ba366e932db386.tar yuzu-e9a857ce82e85c3933f6ce3140ba366e932db386.tar.gz yuzu-e9a857ce82e85c3933f6ce3140ba366e932db386.tar.bz2 yuzu-e9a857ce82e85c3933f6ce3140ba366e932db386.tar.lz yuzu-e9a857ce82e85c3933f6ce3140ba366e932db386.tar.xz yuzu-e9a857ce82e85c3933f6ce3140ba366e932db386.tar.zst yuzu-e9a857ce82e85c3933f6ce3140ba366e932db386.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/kernel/process.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 5711b5247..c1a883b3c 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp @@ -183,6 +183,8 @@ ResultVal<VAddr> Process::HeapAllocate(VAddr target, u64 size, VMAPermission per // Initialize heap heap_memory = std::make_shared<std::vector<u8>>(); heap_start = heap_end = target; + } else { + vm_manager.UnmapRange(heap_start, heap_end - heap_start); } // If necessary, expand backing vector to cover new heap extents. @@ -202,7 +204,7 @@ ResultVal<VAddr> Process::HeapAllocate(VAddr target, u64 size, VMAPermission per size, MemoryState::Heap)); vm_manager.Reprotect(vma, perms); - heap_used += size; + heap_used = size; memory_region->used += size; return MakeResult<VAddr>(heap_end - size); |