lol
at 22.05-pre 32 lines 1.4 kB view raw
1diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c 2--- a/rts/win32/OSMem.c 3+++ b/rts/win32/OSMem.c 4@@ -41,7 +41,7 @@ static block_rec* free_blocks = NULL; 5 typedef LPVOID(WINAPI *VirtualAllocExNumaProc)(HANDLE, LPVOID, SIZE_T, DWORD, DWORD, DWORD); 6 7 /* Cache NUMA API call. */ 8-VirtualAllocExNumaProc VirtualAllocExNuma; 9+VirtualAllocExNumaProc _VirtualAllocExNuma; 10 11 void 12 osMemInit(void) 13@@ -52,8 +52,8 @@ osMemInit(void) 14 /* Resolve and cache VirtualAllocExNuma. */ 15 if (osNumaAvailable() && RtsFlags.GcFlags.numa) 16 { 17- VirtualAllocExNuma = (VirtualAllocExNumaProc)GetProcAddress(GetModuleHandleW(L"kernel32"), "VirtualAllocExNuma"); 18- if (!VirtualAllocExNuma) 19+ _VirtualAllocExNuma = (VirtualAllocExNumaProc)(void*)GetProcAddress(GetModuleHandleW(L"kernel32"), "VirtualAllocExNuma"); 20+ if (!_VirtualAllocExNuma) 21 { 22 sysErrorBelch( 23 "osBindMBlocksToNode: VirtualAllocExNuma does not exist. How did you get this far?"); 24@@ -569,7 +569,7 @@ void osBindMBlocksToNode( 25 On windows also -xb is broken, it does nothing so that can't 26 be used to tweak it (see #12577). So for now, just let the OS decide. 27 */ 28- temp = VirtualAllocExNuma( 29+ temp = _VirtualAllocExNuma( 30 GetCurrentProcess(), 31 NULL, // addr? See base memory 32 size,