https://gcc.gnu.org/g:a0a4ee875a49c7ffb04e6b7cec709a8cae90d3f8

commit r17-925-ga0a4ee875a49c7ffb04e6b7cec709a8cae90d3f8
Author: Peter Damianov <[email protected]>
Date:   Fri May 29 08:53:42 2026 +0200

    libgfortran: Use MapViewOfFileEx instead of MapViewOfFileExNuma in caf_shmem
    
    MapViewOfFileExNuma is only present when _WIN32_WINNT >= 0x0600 (Windows 
Vista
    or later). The code is passing NUMA_NO_PREFERRED_MODE, and that
    is documented as:
    
    No NUMA node is preferred. This is the same as calling the MapViewOfFileEx
    function.
    
    
https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-mapviewoffileexnuma
    
    So, MapViewOfFileEx will behave identically, while still allowing Windows XP
    support.
    
    libgfortran/ChangeLog:
    
            * caf/shmem/shared_memory.c (shared_memory_init): Use
            MapViewOfFileEx instead of MapViewOfFileExNuma.

Diff:
---
 libgfortran/caf/shmem/shared_memory.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgfortran/caf/shmem/shared_memory.c 
b/libgfortran/caf/shmem/shared_memory.c
index afafd50f80b1..a2520a89cc7b 100644
--- a/libgfortran/caf/shmem/shared_memory.c
+++ b/libgfortran/caf/shmem/shared_memory.c
@@ -234,8 +234,8 @@ shared_memory_init (shared_memory_act *mem, size_t size)
     }
 #elif defined(WIN32)
   mem->glbl.base
-    = (LPTSTR) MapViewOfFileExNuma (mem->shm_fd, FILE_MAP_ALL_ACCESS, 0, 0,
-                                   size, base_ptr, NUMA_NO_PREFERRED_NODE);
+    = (LPTSTR) MapViewOfFileEx (mem->shm_fd, FILE_MAP_ALL_ACCESS, 0, 0,
+                               size, base_ptr);
   if (mem->glbl.base == NULL)
     {
       perror ("MapViewOfFile failed");

Reply via email to