diff options
author | bunnei <bunneidev@gmail.com> | 2018-11-19 04:23:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-19 04:23:38 +0100 |
commit | e34d47e6e36f5c99211d0382eded6dbb78ed805e (patch) | |
tree | 262bc94da150ef3b2995d72671ac075c2053ef4f /src/core/hle/kernel/vm_manager.cpp | |
parent | Merge pull request #1718 from ogniK5377/lets-go-softlock (diff) | |
parent | ldr_ro: Add error check for memory allocation failure (diff) | |
download | yuzu-e34d47e6e36f5c99211d0382eded6dbb78ed805e.tar yuzu-e34d47e6e36f5c99211d0382eded6dbb78ed805e.tar.gz yuzu-e34d47e6e36f5c99211d0382eded6dbb78ed805e.tar.bz2 yuzu-e34d47e6e36f5c99211d0382eded6dbb78ed805e.tar.lz yuzu-e34d47e6e36f5c99211d0382eded6dbb78ed805e.tar.xz yuzu-e34d47e6e36f5c99211d0382eded6dbb78ed805e.tar.zst yuzu-e34d47e6e36f5c99211d0382eded6dbb78ed805e.zip |
Diffstat (limited to 'src/core/hle/kernel/vm_manager.cpp')
-rw-r--r-- | src/core/hle/kernel/vm_manager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index ec7fd6150..100f8f6bf 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp @@ -298,7 +298,7 @@ ResultCode VMManager::HeapFree(VAddr target, u64 size) { return RESULT_SUCCESS; } -ResultCode VMManager::MirrorMemory(VAddr dst_addr, VAddr src_addr, u64 size) { +ResultCode VMManager::MirrorMemory(VAddr dst_addr, VAddr src_addr, u64 size, MemoryState state) { const auto vma = FindVMA(src_addr); ASSERT_MSG(vma != vma_map.end(), "Invalid memory address"); @@ -312,8 +312,8 @@ ResultCode VMManager::MirrorMemory(VAddr dst_addr, VAddr src_addr, u64 size) { const std::shared_ptr<std::vector<u8>>& backing_block = vma->second.backing_block; const std::size_t backing_block_offset = vma->second.offset + vma_offset; - CASCADE_RESULT(auto new_vma, MapMemoryBlock(dst_addr, backing_block, backing_block_offset, size, - MemoryState::Mapped)); + CASCADE_RESULT(auto new_vma, + MapMemoryBlock(dst_addr, backing_block, backing_block_offset, size, state)); // Protect mirror with permissions from old region Reprotect(new_vma, vma->second.permissions); // Remove permissions from old region |