From d17a4fb8cc8051d23d6e356efce1e7fa6bdcabbd Mon Sep 17 00:00:00 2001 From: Stephen Miller <56742918+StevenMiller123@users.noreply.github.com> Date: Sun, 5 Oct 2025 14:46:06 -0500 Subject: [PATCH] Include older Windows 11 builds in the address space workaround (#3711) For now, I've included up to Windows 11 22H2 in the workaround. I've only personally seen reports of issues on Windows 11 21H2, but better safe than sorry (considering Windows 10 22H2 has issues). --- src/core/address_space.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/address_space.cpp b/src/core/address_space.cpp index 8fd857b0f..3f2d94cbf 100644 --- a/src/core/address_space.cpp +++ b/src/core/address_space.cpp @@ -118,9 +118,10 @@ struct AddressSpace::Impl { RtlGetVersion(&os_version_info); u64 supported_user_max = USER_MAX; - static constexpr s32 Windows11BuildNumber = 22000; - if (os_version_info.dwBuildNumber < Windows11BuildNumber) { - // Windows 10 has an issue with VirtualAlloc2 on higher addresses. + // This is the build number for Windows 11 22H2 + static constexpr s32 AffectedBuildNumber = 22621; + if (os_version_info.dwBuildNumber <= AffectedBuildNumber) { + // Older Windows builds have an issue with VirtualAlloc2 on higher addresses. // To prevent regressions, limit the maximum address we reserve for this platform. supported_user_max = 0x11000000000ULL; LOG_WARNING(Core, "Windows 10 detected, reducing user max to {:#x} to avoid problems",