System: Add advanced 'Export Shared Memory' option

Memory map is exported as duckstation_<pid>. Previously, this only
worked on Windows, now it is extended to Linux as well.
This commit is contained in:
Stenzek
2024-08-04 20:00:33 +10:00
parent c538df317a
commit 02fbfae6a0
12 changed files with 187 additions and 55 deletions

View File

@ -116,6 +116,14 @@ static constexpr size_t FASTMEM_ARENA_SIZE = UINT64_C(0x100000000);
bool AllocateMemory(Error* error);
void ReleaseMemory();
/// Frees and re-allocates the memory map for the process.
/// This should be called when shared memory exports are enabled.
bool ReallocateMemoryMap(Error* error);
/// Cleans up/deletes the shared memory object for this process.
/// Should be called when the process crashes, to avoid leaking.
void CleanupMemoryMap();
bool Initialize();
void Shutdown();
void Reset();