- MC_NPPOOL is special-cased in the memory balancer core to always force the allocati...
authorReactOS Portable Systems Group <ros-arm-bringup@svn.reactos.org>
Sun, 21 Jun 2009 09:08:05 +0000 (09:08 +0000)
committerReactOS Portable Systems Group <ros-arm-bringup@svn.reactos.org>
Sun, 21 Jun 2009 09:08:05 +0000 (09:08 +0000)
- This fixes booting on systems which required enough page tables such that the balancer refused the allocation of new pages (around 64+16 pages for page tables of 4KB each, ie. 320MB).

svn path=/trunk/; revision=41511

reactos/ntoskrnl/mm/balance.c

index c7de815..184b2a2 100644 (file)
@@ -85,6 +85,8 @@ MmInitializeBalancer(ULONG NrAvailablePages, ULONG NrSystemPages)
    MiMemoryConsumers[MC_PPOOL].PagesTarget = NrAvailablePages / 2;
    MiMemoryConsumers[MC_NPPOOL].PagesTarget = 0xFFFFFFFF;
    MiMemoryConsumers[MC_NPPOOL].PagesUsed = NrSystemPages;
+   MiMemoryConsumers[MC_SYSTEM].PagesTarget = 0xFFFFFFFF;
+   MiMemoryConsumers[MC_SYSTEM].PagesUsed = 0;
 }
 
 VOID
@@ -221,7 +223,7 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait,
    /*
     * Allocate always memory for the non paged pool and for the pager thread.
     */
-   if (Consumer == MC_NPPOOL || MiIsBalancerThread())
+   if ((Consumer == MC_NPPOOL) || (Consumer == MC_SYSTEM) || MiIsBalancerThread())
    {
       Page = MmAllocPage(Consumer, 0);
       if (Page == 0)