diff options
author | Tamar Christina <tamar@zhox.com> | 2019-09-08 23:11:19 +0100 |
---|---|---|
committer | Tamar Christina <tamar@zhox.com> | 2019-10-20 16:21:10 +0100 |
commit | 4b431f334018eaef2cf36de3316025c68c922915 (patch) | |
tree | 7f85d5a1a6bc6d39e9a8c51fe33904ff61461a7e /rts/win32/OSMem.c | |
parent | c4c9904b324736dc5d190a91418e8d8f564d4104 (diff) | |
download | haskell-4b431f334018eaef2cf36de3316025c68c922915.tar.gz |
Windows: Update tarballs to GCC 9.2 and remove MAX_PATH limit.
Diffstat (limited to 'rts/win32/OSMem.c')
-rw-r--r-- | rts/win32/OSMem.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c index 57997b1ac5..35fe72fd58 100644 --- a/rts/win32/OSMem.c +++ b/rts/win32/OSMem.c @@ -41,7 +41,7 @@ static block_rec* free_blocks = NULL; typedef LPVOID(WINAPI *VirtualAllocExNumaProc)(HANDLE, LPVOID, SIZE_T, DWORD, DWORD, DWORD); /* Cache NUMA API call. */ -VirtualAllocExNumaProc VirtualAllocExNuma; +VirtualAllocExNumaProc _VirtualAllocExNuma; void osMemInit(void) @@ -52,8 +52,8 @@ osMemInit(void) /* Resolve and cache VirtualAllocExNuma. */ if (osNumaAvailable() && RtsFlags.GcFlags.numa) { - VirtualAllocExNuma = (VirtualAllocExNumaProc)GetProcAddress(GetModuleHandleW(L"kernel32"), "VirtualAllocExNuma"); - if (!VirtualAllocExNuma) + _VirtualAllocExNuma = (VirtualAllocExNumaProc)(void*)GetProcAddress(GetModuleHandleW(L"kernel32"), "VirtualAllocExNuma"); + if (!_VirtualAllocExNuma) { sysErrorBelch( "osBindMBlocksToNode: VirtualAllocExNuma does not exist. How did you get this far?"); @@ -569,7 +569,7 @@ void osBindMBlocksToNode( On windows also -xb is broken, it does nothing so that can't be used to tweak it (see #12577). So for now, just let the OS decide. */ - temp = VirtualAllocExNuma( + temp = _VirtualAllocExNuma( GetCurrentProcess(), NULL, // addr? See base memory size, |