diff -urN wine-11.18-orig/dlls/ntdll/unix/virtual.c wine-11.18/dlls/ntdll/unix/virtual.c --- wine-11.18-orig/dlls/ntdll/unix/virtual.c 2026-09-19 05:36:23 +0900 +++ wine-11.18/dlls/ntdll/unix/virtual.c 2026-09-19 17:24:38 +0900 @@ -4072,6 +4072,14 @@ /* enable use of a large address space when allowed by the application */ static void set_large_address_space(void) { + const char *force_laa_str; + int force_laa; + int is_laa; + + force_laa_str = getenv("WINEFORCELARGEADDRESSAWARE"); + force_laa = (force_laa_str != NULL && *force_laa_str != '\0'); + is_laa = (force_laa || (main_image_info.ImageCharacteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE)); + if (main_image_info.Machine == IMAGE_FILE_MACHINE_I386) { /* reserve the DOS area, and make it accessible (except the low 64K) @@ -4091,7 +4099,7 @@ if (use_aslr()) free_reserved_memory( 0, (char *)0x7ffe0000 ); #endif } - else if (main_image_info.ImageCharacteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE) + else if (is_laa) { user_space_wow_limit = limit_4g - 1; /* reserve space for top-down allocations; some apps break if the entire high 2G is available */ @@ -4101,7 +4109,7 @@ } else { - if (!(main_image_info.ImageCharacteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE)) return; + if (!is_laa) return; free_reserved_memory( (char *)0x80000000, address_space_limit ); } user_space_limit = working_set_limit = address_space_limit;