Reserves and/or commits a region of memory within the virtual address space of the target process.
HRESULT AllocateVirtualMemory( UINT64 address, DWORD size, DWORD allocationType, DWORD pageProtection, UINT64 *pAllocatedAddress );
- address
[in] The address within the target process where the memory should be committed or reserved. This value is typically zero, in which case the system chooses an address.
- size
[in] The size of the region of memory to allocate, in bytes. The system will automatically round up to the next page boundary.
- allocationType
[in] Indicates the type of allocation to perform. This is typically MEM_COMMIT | MEM_RESERVE (0x3000) which reserves and commits an allocation in one step.
- pageProtection
[in] The memory protection for the region of pages to be allocated. If the pages are being committed, you can specify any one of the memory protection constants (for example, PAGE_READWRITE, PAGE_EXECUTE).
- pAllocatedAddress
[out] Base address of the allocated region of pages.
The function initializes the memory it allocates to zero, unless MEM_RESET is used. For additional information, see the VirtualAlloc Win32 API.
Requirements
Header: jscript9diag.h