Skip to content

Commit

Permalink
[NTOS:MM] MmRequestPageMemoryConsumer: Properly mark CORE-17624 delay…
Browse files Browse the repository at this point in the history
… hack

Addendum to commit 2b14056.
  • Loading branch information
TAN-Gaming committed Dec 25, 2024
1 parent e8df2a3 commit eba64ca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ntoskrnl/mm/balance.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,12 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait,
PPFN_NUMBER AllocatedPage)
{
PFN_NUMBER Page;

/* Delay some requests for the Memory Manager to recover pages (CORE-17624).
* FIXME: This is suboptimal.
*/
static INT i = 0;
static LARGE_INTEGER TinyTime = {{-1L, -1L}};

/* Delay some requests for the Memory Manager to recover pages */
if (i++ >= 100)
{
KeDelayExecutionThread(KernelMode, FALSE, &TinyTime);
Expand Down

0 comments on commit eba64ca

Please sign in to comment.