VirtualAlloc function Null safety kernel32

Pointer<NativeType> VirtualAlloc(
  1. Pointer<NativeType> lpAddress,
  2. int dwSize,
  3. int flAllocationType,
  4. int flProtect
)

Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process. Memory allocated by this function is automatically initialized to zero.

LPVOID VirtualAlloc(
  LPVOID lpAddress,
  SIZE_T dwSize,
  DWORD  flAllocationType,
  DWORD  flProtect
);

Implementation

Pointer VirtualAlloc(
        Pointer lpAddress, int dwSize, int flAllocationType, int flProtect) =>
    _VirtualAlloc(lpAddress, dwSize, flAllocationType, flProtect);