diff options
author | Lioncash <mathew1800@gmail.com> | 2019-03-22 19:51:36 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-03-22 23:43:46 +0100 |
commit | c0a01f3adc466d07fc27020048e82cca60988970 (patch) | |
tree | 4bf8428709b8a55210a9591841c0dde623386ad1 /src/core/hle/kernel/process.cpp | |
parent | Merge pull request #2234 from lioncash/mutex (diff) | |
download | yuzu-c0a01f3adc466d07fc27020048e82cca60988970.tar yuzu-c0a01f3adc466d07fc27020048e82cca60988970.tar.gz yuzu-c0a01f3adc466d07fc27020048e82cca60988970.tar.bz2 yuzu-c0a01f3adc466d07fc27020048e82cca60988970.tar.lz yuzu-c0a01f3adc466d07fc27020048e82cca60988970.tar.xz yuzu-c0a01f3adc466d07fc27020048e82cca60988970.tar.zst yuzu-c0a01f3adc466d07fc27020048e82cca60988970.zip |
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
-rw-r--r-- | src/core/hle/kernel/process.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 0d782e4ba..87779a71c 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp @@ -210,11 +210,13 @@ void Process::FreeTLSSlot(VAddr tls_address) { } void Process::LoadModule(CodeSet module_, VAddr base_addr) { + const auto memory = std::make_shared<std::vector<u8>>(std::move(module_.memory)); + const auto MapSegment = [&](const CodeSet::Segment& segment, VMAPermission permissions, MemoryState memory_state) { const auto vma = vm_manager - .MapMemoryBlock(segment.addr + base_addr, module_.memory, - segment.offset, segment.size, memory_state) + .MapMemoryBlock(segment.addr + base_addr, memory, segment.offset, + segment.size, memory_state) .Unwrap(); vm_manager.Reprotect(vma, permissions); }; |