MiReserveSystemPtes: Don't assert that allocation succeeded, just warn if we failed...
authorStefan Ginsberg <stefanginsberg@gmail.com>
Wed, 7 Oct 2009 20:14:01 +0000 (20:14 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Wed, 7 Oct 2009 20:14:01 +0000 (20:14 +0000)
svn path=/trunk/; revision=43334

reactos/ntoskrnl/mm/ARM3/syspte.c

index 73a1180..b950047 100644 (file)
@@ -170,12 +170,26 @@ MiReserveSystemPtes(IN ULONG NumberOfPtes,
                     IN MMSYSTEM_PTE_POOL_TYPE SystemPtePoolType)
 {
     PMMPTE PointerPte;
-    
+
     //
     // Use the extended function
     //
     PointerPte = MiReserveAlignedSystemPtes(NumberOfPtes, SystemPtePoolType, 0);
-    ASSERT(PointerPte != NULL);
+
+    //
+    // Check if allocation failed
+    //
+    if (!PointerPte)
+    {
+        //
+        // Warn that we are out of memory
+        //
+        DPRINT1("MiReserveSystemPtes: Failed to reserve %lu PTE(s)!\n", NumberOfPtes);
+    }
+
+    //
+    // Return the PTE Pointer
+    //
     return PointerPte;
 }