summaryrefslogtreecommitdiff
path: root/rts/win32/OSMem.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/win32/OSMem.c')
-rw-r--r--rts/win32/OSMem.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c
index dd0f60ff0a..fd26d06c4e 100644
--- a/rts/win32/OSMem.c
+++ b/rts/win32/OSMem.c
@@ -37,28 +37,11 @@ static alloc_rec* allocs = NULL;
/* free_blocks are kept in ascending order, and adjacent blocks are merged */
static block_rec* free_blocks = NULL;
-/* Mingw-w64 does not currently have this in their header. So we have to import it.*/
-typedef LPVOID(WINAPI *VirtualAllocExNumaProc)(HANDLE, LPVOID, SIZE_T, DWORD, DWORD, DWORD);
-
-/* Cache NUMA API call. */
-VirtualAllocExNumaProc _VirtualAllocExNuma;
-
void
osMemInit(void)
{
allocs = NULL;
free_blocks = NULL;
-
- /* Resolve and cache VirtualAllocExNuma. */
- if (osNumaAvailable() && RtsFlags.GcFlags.numa)
- {
- _VirtualAllocExNuma = (VirtualAllocExNumaProc)(void*)GetProcAddress(GetModuleHandleW(L"kernel32"), "VirtualAllocExNuma");
- if (!_VirtualAllocExNuma)
- {
- sysErrorBelch(
- "osBindMBlocksToNode: VirtualAllocExNuma does not exist. How did you get this far?");
- }
- }
}
static
@@ -569,7 +552,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,