When passing 0x000'00000000
(NULL
) as the first parameter of VirtualAlloc
the system determines where to allocate the region, or if the function fails, the return value is NULL
(0x000'00000000
).
For a 64-bit process on 64-bit Windows, the virtual address space ranges from 0x000'00000000
through 0x7FFF'FFFFFFFF
.
So how do I reserve a page starting at 0x000'00000000
without the function failing and system determining where to allocate the region?