[NTOSKRNL]
authorCameron Gutman <aicommander@gmail.com>
Sat, 3 Dec 2011 10:30:02 +0000 (10:30 +0000)
committerCameron Gutman <aicommander@gmail.com>
Sat, 3 Dec 2011 10:30:02 +0000 (10:30 +0000)
commitb3c3a8b9ea3b1dd49a2a837997175f62d8c30ef8
treeee2062e946746e16bf89f831ae5dd4220f0ff4dd
parent164b6995a0b2f1e3e780d8104404cd53d6b88702
[NTOSKRNL]
NtFreeVirtualMemory:
- Handle the case where a region size of 0 is passed in
- Return the correct error status for failure
- Copy back the rounded values
- Add checks and prints to catch callers doing nasty things  (one is commented out because csrsrv triggers it trying to release the first 1 MB of RAM during video init, not sure what to do there)

- There is a heap bug where calling RtlReAllocateHeap on a large block allocation (HEAP_ENTRY_VIRTUAL_ALLOC is set) will cause a call to NtFreeVirtualMemory with an offset base (illegal) and a length smaller than the total pages reserved in the VM region (also illegal). This bug is exposed by setupapi when it parses large INF files (like the PRO/1000 driver INF).

svn path=/trunk/; revision=54565
reactos/ntoskrnl/mm/anonmem.c