diff --git a/reactos/ntoskrnl/mm/anonmem.c b/reactos/ntoskrnl/mm/anonmem.c index e7e68b48841..967e749b74a 100644 --- a/reactos/ntoskrnl/mm/anonmem.c +++ b/reactos/ntoskrnl/mm/anonmem.c @@ -727,6 +727,15 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle, MmUnlockAddressSpace(AddressSpace); ObDereferenceObject(Process); DPRINT("NtAllocateVirtualMemory() = %x\n",Status); + + /* Give the caller rounded BaseAddress and area length */ + if (NT_SUCCESS(Status)) + { + *UBaseAddress = BaseAddress; + *URegionSize = RegionSize; + DPRINT("*UBaseAddress %x *URegionSize %x\n", BaseAddress, RegionSize); + } + return(Status); } else if (MemoryAreaLength >= RegionSize) @@ -749,6 +758,15 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle, MmUnlockAddressSpace(AddressSpace); ObDereferenceObject(Process); DPRINT("NtAllocateVirtualMemory() = %x\n",Status); + + /* Give the caller rounded BaseAddress and area length */ + if (NT_SUCCESS(Status)) + { + *UBaseAddress = BaseAddress; + *URegionSize = RegionSize; + DPRINT("*UBaseAddress %x *URegionSize %x\n", BaseAddress, RegionSize); + } + return(Status); } else