VirtualAlloc
VirtualAlloc allocates memory in the RTX64 virtual address space. Memory allocated by this function is uninitialized.
Syntax
LPVOID WINAPI VirtualAlloc( LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect );
Parameters
lpAddress
The starting address of the region to allocate. This must be NULL or an address obtained from a previous call to this function. If this is non-NULL, dwSize is ignored.
dwSize
The size of the region, in bytes. This is ignored if lpAddress is non-NULL. This is rounded up to the next page boundary.
flAllocationType
The type of memory allocation. This parameter must contain one of the following values:
0x0 — Allocates memory normally.
MEM_RESERVE — When this allocation type is given, if dwSize is greater than 1,048,576 bytes (1 MB), it is set to 1,048,576 bytes.
flProtect
This parameter is ignored.
Return Value
The base address of the allocated memory if the function succeeds, NULL if the function fails.
Requirements
Minimum Supported Version | RTX64 2014 |
Header | windows.h |
Library | Rtx_Rtss.lib |
See Also: