[NTOS:MM] Get rid of unnecessary MmZeroingPageThreadActive.

This commit is contained in:
Thomas Faber 2020-02-22 12:31:54 +01:00
parent 5280deecfa
commit 25a5aee86f
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
4 changed files with 4 additions and 8 deletions

View file

@ -639,7 +639,6 @@ extern PMMPDE MiHighestUserPde;
extern PFN_NUMBER MmSystemPageDirectory[PPE_PER_PAGE];
extern PMMPTE MmSharedUserDataPte;
extern LIST_ENTRY MmProcessList;
extern BOOLEAN MmZeroingPageThreadActive;
extern KEVENT MmZeroingPageEvent;
extern ULONG MmSystemPageColor;
extern ULONG MmProcessColorSeed;

View file

@ -2181,9 +2181,8 @@ MmArmInitSystem(IN ULONG Phase,
/* Initialize the Loader Lock */
KeInitializeMutant(&MmSystemLoadLock, FALSE);
/* Set the zero page event */
KeInitializeEvent(&MmZeroingPageEvent, SynchronizationEvent, FALSE);
MmZeroingPageThreadActive = FALSE;
/* Set up the zero page event */
KeInitializeEvent(&MmZeroingPageEvent, NotificationEvent, FALSE);
/* Initialize the dead stack S-LIST */
InitializeSListHead(&MmDeadStackSListHead);

View file

@ -701,10 +701,9 @@ MiInsertPageInFreeList(IN PFN_NUMBER PageFrameIndex)
ColorTable->Count++;
/* Notify zero page thread if enough pages are on the free list now */
if ((ListHead->Total >= 8) && !(MmZeroingPageThreadActive))
if (ListHead->Total >= 8)
{
/* Set the event */
MmZeroingPageThreadActive = TRUE;
KeSetEvent(&MmZeroingPageEvent, IO_NO_INCREMENT, FALSE);
}

View file

@ -17,7 +17,6 @@
/* GLOBALS ********************************************************************/
BOOLEAN MmZeroingPageThreadActive;
KEVENT MmZeroingPageEvent;
/* PRIVATE FUNCTIONS **********************************************************/
@ -73,7 +72,7 @@ MmZeroPageThread(VOID)
{
if (!MmFreePageListHead.Total)
{
MmZeroingPageThreadActive = FALSE;
KeClearEvent(&MmZeroingPageEvent);
MiReleasePfnLock(OldIrql);
break;
}