[ros-diffs] [ion] 55330: [NTOSKRNL]: Keep doing the old region/swap work incorrectly, but at least return a correct size. Let's see if this fixes it.

ion at svn.reactos.org ion at svn.reactos.org
Mon Jan 30 17:19:15 UTC 2012


Author: ion
Date: Mon Jan 30 17:19:14 2012
New Revision: 55330

URL: http://svn.reactos.org/svn/reactos?rev=55330&view=rev
Log:
[NTOSKRNL]: Keep doing the old region/swap work incorrectly, but at least return a correct size. Let's see if this fixes it.

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=55330&r1=55329&r2=55330&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] Mon Jan 30 17:19:14 2012
@@ -874,14 +874,11 @@
         return(Status);
     }
 
-#if 0
     MemoryAreaLength = (ULONG_PTR)MemoryArea->EndingAddress -
         (ULONG_PTR)MemoryArea->StartingAddress;
-#else
     ULONG_PTR EndingAddress;
     EndingAddress = ((ULONG_PTR)MemoryArea->StartingAddress + RegionSize - 1) | (PAGE_SIZE - 1);
-    MemoryAreaLength = (ULONG_PTR)EndingAddress - (ULONG_PTR)MemoryArea->StartingAddress + 1; 
-#endif
+    RegionSize = (ULONG_PTR)EndingAddress - (ULONG_PTR)MemoryArea->StartingAddress + 1; 
     
     MmInitializeRegion(&MemoryArea->Data.VirtualMemoryData.RegionListHead,
         MemoryAreaLength, Type, Protect);
@@ -898,7 +895,7 @@
     if (ProcessHandle != NtCurrentProcess()) ObDereferenceObject(Process);
 
     *UBaseAddress = BaseAddress;
-    *URegionSize = MemoryAreaLength;
+    *URegionSize = RegionSize;
     DPRINT("*UBaseAddress %x  *URegionSize %x\n", BaseAddress, RegionSize);
 
     return(STATUS_SUCCESS);




More information about the Ros-diffs mailing list