From dfd6766411f6d6e2f0aa73a686fb662f3c2cde25 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 19 Jul 2021 15:11:07 +1000 Subject: [PATCH] MemoryArea: Use pid instead of thread id for mapping on Windows --- src/common/memory_arena.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/memory_arena.cpp b/src/common/memory_arena.cpp index 02d7b68f6..19b225c47 100644 --- a/src/common/memory_arena.cpp +++ b/src/common/memory_arena.cpp @@ -106,7 +106,7 @@ bool MemoryArena::IsValid() const static std::string GetFileMappingName() { #if defined(_WIN32) - const unsigned pid = GetCurrentThreadId(); + const unsigned pid = GetCurrentProcessId(); #elif defined(__ANDROID__) || defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) const unsigned pid = static_cast(getpid()); #else