[NTOS/MM]
authorJérôme Gardou <jerome.gardou@reactos.org>
Thu, 19 Jun 2014 10:50:47 +0000 (10:50 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Thu, 19 Jun 2014 10:50:47 +0000 (10:50 +0000)
 - Do not mark VAD as private memory when creating a MEMORY_AREA, as this is never the case (only used for sections)
 - Add a few DPRINTS.
CORE-8140 #resolve fixed with r63618

svn path=/trunk/; revision=63618

reactos/ntoskrnl/mm/ARM3/virtual.c
reactos/ntoskrnl/mm/marea.c

index 44dc2ed..fc87629 100644 (file)
@@ -4398,6 +4398,9 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
         }
     }
 
         }
     }
 
+    DPRINT("NtAllocateVirtualMemory: Process 0x%p, Address 0x%p, Zerobits %lu , RegionSize 0x%x, Allocation type 0x%x, Protect 0x%x.\n",
+        Process, PBaseAddress, ZeroBits, PRegionSize, AllocationType, Protect);
+
     //
     // Check for large page allocations and make sure that the required privilege
     // is being held, before attempting to handle them.
     //
     // Check for large page allocations and make sure that the required privilege
     // is being held, before attempting to handle them.
@@ -4656,6 +4659,7 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
             //
         }
         _SEH2_END;
             //
         }
         _SEH2_END;
+        DPRINT("Reserved %x bytes at %p.\n", PRegionSize, StartingAddress);
         return STATUS_SUCCESS;
     }
 
         return STATUS_SUCCESS;
     }
 
@@ -5153,6 +5157,9 @@ NtFreeVirtualMemory(IN HANDLE ProcessHandle,
         }
     }
 
         }
     }
 
+    DPRINT("NtFreeVirtualMemory: Process 0x%p, Adress 0x%p, size 0x%x, FreeType %x.\n",
+        Process, PBaseAddress, PRegionSize, FreeType);
+
     //
     // Lock the address space
     //
     //
     // Lock the address space
     //
index 6ea4db4..12a7afa 100644 (file)
@@ -399,7 +399,6 @@ MmInsertMemoryArea(
             Vad->EndingVpn = Vad->StartingVpn;
         }
        Vad->u.VadFlags.Spare = 1;
             Vad->EndingVpn = Vad->StartingVpn;
         }
        Vad->u.VadFlags.Spare = 1;
-       Vad->u.VadFlags.PrivateMemory = 1;
        Vad->u.VadFlags.Protection = MiMakeProtectionMask(marea->Protect);
 
        /* Insert the VAD */
        Vad->u.VadFlags.Protection = MiMakeProtectionMask(marea->Protect);
 
        /* Insert the VAD */