diff options
author | Lioncash <mathew1800@gmail.com> | 2019-03-22 14:51:36 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-03-22 18:43:46 -0400 |
commit | c0a01f3adc466d07fc27020048e82cca60988970 (patch) | |
tree | 4bf8428709b8a55210a9591841c0dde623386ad1 /src/core/loader/nro.cpp | |
parent | 7b6d516faa788c25e26c79e2e5d19915f73983a5 (diff) |
kernel/codeset: Make CodeSet's memory data member a regular std::vector
The use of a shared_ptr is an implementation detail of the VMManager
itself when mapping memory. Because of that, we shouldn't require all
users of the CodeSet to have to allocate the shared_ptr ahead of time.
It's intended that CodeSet simply pass in the required direct data, and
that the memory manager takes care of it from that point on.
This means we just do the shared pointer allocation in a single place,
when loading modules, as opposed to in each loader.
Diffstat (limited to 'src/core/loader/nro.cpp')
-rw-r--r-- | src/core/loader/nro.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index 5de02a94b..31e4a0c84 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp @@ -187,7 +187,7 @@ static bool LoadNroImpl(Kernel::Process& process, const std::vector<u8>& data, program_image.resize(static_cast<u32>(program_image.size()) + bss_size); // Load codeset for current process - codeset.memory = std::make_shared<std::vector<u8>>(std::move(program_image)); + codeset.memory = std::move(program_image); process.LoadModule(std::move(codeset), load_base); // Register module with GDBStub |