From: Fabian Maurer Subject: [PATCH 1/2] kernel32: Partially implement VirtualAllocExNuma Message-Id: <20190330194006.1359-1-dark.shadow4@web.de> Date: Sat, 30 Mar 2019 20:40:05 +0100 Ignoring the preferred node should be good enough Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46927 Signed-off-by: Fabian Maurer --- dlls/kernel32/kernel32.spec | 2 +- dlls/kernel32/virtual.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index c8d52cec58..1cf7b58a02 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1559,7 +1559,7 @@ @ stdcall VerifyVersionInfoW(long long int64) @ stdcall VirtualAlloc(ptr long long long) @ stdcall VirtualAllocEx(long ptr long long long) -# @ stub VirtualAllocExNuma +@ stdcall VirtualAllocExNuma(long ptr long long long long) @ stub VirtualBufferExceptionHandler @ stdcall VirtualFree(ptr long long) @ stdcall VirtualFreeEx(long ptr long long) diff --git a/dlls/kernel32/virtual.c b/dlls/kernel32/virtual.c index 42da7f0d8c..e859dd4dcb 100644 --- a/dlls/kernel32/virtual.c +++ b/dlls/kernel32/virtual.c @@ -46,6 +46,7 @@ WINE_DECLARE_DEBUG_CHANNEL(seh); WINE_DECLARE_DEBUG_CHANNEL(file); +WINE_DECLARE_DEBUG_CHANNEL(virtual); /*********************************************************************** @@ -100,6 +101,32 @@ LPVOID WINAPI DECLSPEC_HOTPATCH VirtualAllocEx( HANDLE hProcess, LPVOID addr, SI return ret; } +/*********************************************************************** + * VirtualAllocExNuma (KERNEL32.@) + * + * Seems to be just as VirtualAllocEx, but with a preferred NUMA node. + * + * PARAMS + * hProcess [I] Handle to process to do mem operation. + * addr [I] Address of region to reserve or commit. + * size [I] Size of region. + * type [I] Type of allocation. + * protect [I] Type of access protection. + * numa_node[I] Preferred NUMA node. + * + * + * RETURNS + * Success: Base address of allocated region of pages. + * Failure: NULL. + */ +LPVOID WINAPI DECLSPEC_HOTPATCH VirtualAllocExNuma(HANDLE hProcess, LPVOID addr, SIZE_T size, + DWORD type, DWORD protect, DWORD numa_node) +{ + FIXME_(virtual)("Ignoring preferred numa_node\n"); + + return VirtualAllocEx(hProcess, addr, size, type, protect); +} + /*********************************************************************** * VirtualFree (KERNEL32.@) -- 2.21.0