This commit is contained in:
Nayla Hanegan 2023-05-26 15:52:58 -04:00
commit 871da4e307
No known key found for this signature in database
GPG key ID: BAFE9001DA16CFA2
275 changed files with 33002 additions and 27474 deletions

View file

@ -4,6 +4,7 @@
#pragma once
#include <cstddef>
#include <string_view>
#include <vector>
#include "Common/CommonTypes.h"
@ -34,8 +35,10 @@ public:
/// CreateView() and ReleaseView(). Used to make a mappable region for emulated memory.
///
/// @param size The amount of bytes that should be allocated in this region.
/// @param base_name A base name for the shared memory region, if applicable for this platform.
/// Will be extended with the process ID.
///
void GrabSHMSegment(size_t size);
void GrabSHMSegment(size_t size, std::string_view base_name);
///
/// Release the memory segment previously allocated with GrabSHMSegment().
@ -113,13 +116,9 @@ private:
void* m_address_VirtualAlloc2 = nullptr;
void* m_address_MapViewOfFile3 = nullptr;
#else
#ifdef ANDROID
int fd;
#else
int m_shm_fd;
void* m_reserved_region;
std::size_t m_reserved_region_size;
#endif
int m_shm_fd = 0;
void* m_reserved_region = nullptr;
std::size_t m_reserved_region_size = 0;
#endif
};