mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[NTOSKRNL]
- Fix a logic error - Signal the balancer in the !CanWait case if we're too low on pages since it runs asynchronously as of recently svn path=/trunk/; revision=54591
This commit is contained in:
@@ -239,7 +239,7 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait,
|
||||
/*
|
||||
* Make sure we don't exceed our individual target.
|
||||
*/
|
||||
PagesUsed = InterlockedIncrementUL(&MiMemoryConsumers[Consumer].PagesUsed) + 1;
|
||||
PagesUsed = InterlockedIncrementUL(&MiMemoryConsumers[Consumer].PagesUsed);
|
||||
if (PagesUsed > MiMemoryConsumers[Consumer].PagesTarget &&
|
||||
!MiIsBalancerThread())
|
||||
{
|
||||
@@ -275,6 +275,7 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait,
|
||||
if (!CanWait)
|
||||
{
|
||||
(void)InterlockedDecrementUL(&MiMemoryConsumers[Consumer].PagesUsed);
|
||||
MmRebalanceMemoryConsumers();
|
||||
return(STATUS_NO_MEMORY);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user