Kernel32AllocateUserPhysicalPagesNuma(IntPtr, UIntPtr, UIntPtr, UInt32) Method

Allocates physical memory pages to be mapped and unmapped within any Address Windowing Extensions (AWE) region of a specified process and specifies the NUMA node for the physical memory.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", SetLastError = true)]
public static bool AllocateUserPhysicalPagesNuma(
	IntPtr hProcess,
	ref UIntPtr refNumberOfPages,
	UIntPtr pageArray,
	uint nndPreferred
)

Parameters

hProcess  IntPtr
A handle to a process.

The function allocates memory that can later be mapped within the virtual address space of this process.

The handle must have the VirtualMemoryOperation access right.

refNumberOfPages  UIntPtr
The size of the physical memory to allocate, in pages.

To determine the page size of the computer, use the GetSystemInfo function. On output, this parameter receives the number of pages that are actually allocated, which might be less than the number requested.

pageArray  UIntPtr
A pointer to an array to store the page frame numbers of the allocated memory.

The size of the array that is allocated should be at least the refNumberOfPages times the size of the ULONG_PTR data type.

Caution: Do not attempt to modify this buffer. It contains operating system data, and corruption could be catastrophic. The information in the buffer is not useful to an application.

nndPreferred  UInt32
The NUMA node where the physical memory should reside.

Return Value

Boolean
If the function succeeds, the return value is .

If the function fails, the return value is .

To get extended error information, call GetLastWin32Error.

Remarks

See Also