if (Consumer == MC_USER) MmInsertLRULastUserPage(Page);
*AllocatedPage = Page;
if (MmAvailablePages <= MiMinimumAvailablePages &&
- MiBalancerThreadHandle != NULL)
+ MiBalancerThreadHandle != NULL &&
+ !MiIsBalancerThread())
{
KeSetEvent(&MiBalancerEvent, IO_NO_INCREMENT, FALSE);
}
*AllocatedPage = Page;
(void)InterlockedDecrementUL(&MiPagesRequired);
+
+ if (MmAvailablePages <= MiMinimumAvailablePages &&
+ MiBalancerThreadHandle != NULL &&
+ !MiIsBalancerThread())
+ {
+ KeSetEvent(&MiBalancerEvent, IO_NO_INCREMENT, FALSE);
+ }
return(STATUS_SUCCESS);
}
}
if(Consumer == MC_USER) MmInsertLRULastUserPage(Page);
*AllocatedPage = Page;
+
+ if (MmAvailablePages <= MiMinimumAvailablePages &&
+ MiBalancerThreadHandle != NULL &&
+ !MiIsBalancerThread())
+ {
+ KeSetEvent(&MiBalancerEvent, IO_NO_INCREMENT, FALSE);
+ }
return(STATUS_SUCCESS);
}