diff options
| author | lizzie <lizzie@eden-emu.dev> | 2026-02-28 01:06:33 +0100 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-02-28 01:06:33 +0100 |
| commit | 06a08de68a95506a9cbe4633c58f6bdb5ded0c70 (patch) | |
| tree | 122a2d66da07e0fdbdbf3c466c1cf88d4d4b4d01 /src/core/file_sys/kernel_executable.h | |
| parent | f8712e50e6860616b4ea86d57a9b09cd99aad728 (diff) | |
[core/loader] prevent program_image reallocations in NSO+KIP loading methods (#3639)
also changes some methods to std::span<> as well, but mainly std::vector<> in the NSO/KIP loading stuff is not needed to be memcpy'ed and memmove'd around
this should save a marginal amount of loading time (RDR1)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3639
Reviewed-by: DraVee <dravee@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
Diffstat (limited to 'src/core/file_sys/kernel_executable.h')
| -rw-r--r-- | src/core/file_sys/kernel_executable.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/file_sys/kernel_executable.h b/src/core/file_sys/kernel_executable.h index 928ba2d99f..ac4b1acaf4 100644 --- a/src/core/file_sys/kernel_executable.h +++ b/src/core/file_sys/kernel_executable.h @@ -1,9 +1,13 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include <array> +#include <span> #include <string> #include <vector> @@ -70,9 +74,9 @@ public: u32 GetMainThreadStackSize() const; u32 GetMainThreadCpuCore() const; - const std::vector<u8>& GetTextSection() const; - const std::vector<u8>& GetRODataSection() const; - const std::vector<u8>& GetDataSection() const; + std::span<const u8> GetTextSection() const; + std::span<const u8> GetRODataSection() const; + std::span<const u8> GetDataSection() const; u32 GetTextOffset() const; u32 GetRODataOffset() const; |
