Author: mjmartin
Date: Fri May 8 11:13:41 2009
New Revision: 40833
URL:
http://svn.reactos.org/svn/reactos?rev=40833&view=rev
Log:
- NtFreeVirtualMemory: Pass RegionListHead from SectionData vice VirtualMemoryData to
MmAlterRegion
for MemoryArea->Type of Section view. Fixes MapViewOfFile tests for
kernel32_winetests.
More investigation is needed on whether this function should even succeed on FileMapping
Objects.
Modified:
trunk/reactos/ntoskrnl/mm/anonmem.c
Modified: trunk/reactos/ntoskrnl/mm/anonmem.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/anonmem.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] Fri May 8 11:13:41 2009
@@ -1003,7 +1003,9 @@
Status =
MmAlterRegion(AddressSpace,
MemoryArea->StartingAddress,
- &MemoryArea->Data.VirtualMemoryData.RegionListHead,
+ (MemoryArea->Type == MEMORY_AREA_SECTION_VIEW) ?
+ &MemoryArea->Data.SectionData.RegionListHead :
+ &MemoryArea->Data.VirtualMemoryData.RegionListHead,
BaseAddress,
RegionSize,
MEM_RESERVE,