mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
- MC_NPPOOL is special-cased in the memory balancer core to always force the allocation of a page, even in low-memory conditions (which in ReactOS, occur early-on because, in a stroke of typical ReactOS genius, the balancer core is called before the balancer initailizes its values and thresholds). Make MC_SYSTEM special-cased as well, so we never fail to allocate page tables early-on.
- 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
This commit is contained in:
parent
e7b3dac46f
commit
88b93de202
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue