From f5f76e4b191e393dfcdffe06a13d4aafe6e45f7f Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Sun, 10 Nov 2019 15:09:08 +0100 Subject: added MEM_RESERVE as comment, needs to be verified if it is required for a stable VAD Unlink --- KMemDriver/Memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KMemDriver/Memory.c b/KMemDriver/Memory.c index d9c46e7..9a064c3 100644 --- a/KMemDriver/Memory.c +++ b/KMemDriver/Memory.c @@ -290,7 +290,7 @@ NTSTATUS AllocMemoryToProcess(IN PEPROCESS pep, IN OUT PVOID *baseAddr, IN OUT S return STATUS_UNSUCCESSFUL; } KeStackAttachProcess((PRKPROCESS)pep, apc); - status = ZwAllocateVirtualMemory(ZwCurrentProcess(), baseAddr, 0, outSize, MEM_COMMIT, protect); + status = ZwAllocateVirtualMemory(ZwCurrentProcess(), baseAddr, 0, outSize, MEM_COMMIT /* | MEM_RESERVE */, protect); if (!NT_SUCCESS(status)) { KDBG("ZwAllocateVirtualMemory failed with 0x%X\n", status); } -- cgit v1.2.3