diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-05-19 19:24:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-19 19:24:31 +0200 |
| commit | 82ecbbe7953af9d07b8899e8a59e91aed409d93d (patch) | |
| tree | 1e8754c5f0667cbcf2268ab305e725166acfccca /Source/Core/Common/MemArenaUnix.cpp | |
| parent | b0d7fa9eb11676cf5ade0a0f5a9a3a07e3bd7224 (diff) | |
| parent | 8342164dbdf6d862556de017f67ff28ecde0f0ec (diff) | |
Merge pull request #11822 from AdmiralCurtiss/win-large-memarena
Common/MemArenaWin: Improve file mapping logic.
Diffstat (limited to 'Source/Core/Common/MemArenaUnix.cpp')
| -rw-r--r-- | Source/Core/Common/MemArenaUnix.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/Common/MemArenaUnix.cpp b/Source/Core/Common/MemArenaUnix.cpp index 549ce09cfd..1532699276 100644 --- a/Source/Core/Common/MemArenaUnix.cpp +++ b/Source/Core/Common/MemArenaUnix.cpp @@ -10,6 +10,8 @@ #include <set> #include <string> +#include <fmt/format.h> + #include <fcntl.h> #include <sys/mman.h> #include <unistd.h> @@ -25,9 +27,9 @@ namespace Common MemArena::MemArena() = default; MemArena::~MemArena() = default; -void MemArena::GrabSHMSegment(size_t size) +void MemArena::GrabSHMSegment(size_t size, std::string_view base_name) { - const std::string file_name = "/dolphin-emu." + std::to_string(getpid()); + const std::string file_name = fmt::format("/{}.{}", base_name, getpid()); m_shm_fd = shm_open(file_name.c_str(), O_RDWR | O_CREAT | O_EXCL, 0600); if (m_shm_fd == -1) { |
