From a65e1bf7e587cbac219307d96805fc097ae9bcb5 Mon Sep 17 00:00:00 2001 From: Egor Lazarchuk <48793978+ShadowCurse@users.noreply.github.com> Date: Sun, 5 Jul 2026 10:57:10 +0100 Subject: [PATCH] Allocator: fix the caching of host va size Commit abf9724 ("Allocator: Fix and optimize VA range detection") removed assignment to the `HostVASize` global thus making each call to `DetermineVASize` redo all the work with potential to produce incorrect results. Set the global again to fix this. --- FEXCore/Source/Utils/Allocator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/FEXCore/Source/Utils/Allocator.cpp b/FEXCore/Source/Utils/Allocator.cpp index 83b2e6d0c..71b4110b7 100644 --- a/FEXCore/Source/Utils/Allocator.cpp +++ b/FEXCore/Source/Utils/Allocator.cpp @@ -125,6 +125,7 @@ FEX_DEFAULT_VISIBILITY size_t DetermineVASize() { ::munmap(Ptr, FEXCore::Utils::FEX_PAGE_SIZE); } if (Ptr != (void*)~0ULL || errno == EEXIST) { + HostVASize = Bits; return Bits; } }