mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Revert "[NTOS:MM] Do proper checks & acquire proper locks when sweeping user pages"
This reverts commit 7c006df7e0
.
Note to self: This is what happens when you have too many branch and push the wrong one.
This commit is contained in:
parent
7c006df7e0
commit
676dc4b441
1 changed files with 7 additions and 14 deletions
|
@ -213,22 +213,15 @@ MmTrimUserMemory(ULONG Target, ULONG Priority, PULONG NrFreedPages)
|
|||
|
||||
MmLockAddressSpace(&Process->Vm);
|
||||
|
||||
if (!Process->VmDeleted)
|
||||
/* Be sure this is still valid. */
|
||||
PMMPTE Pte = MiAddressToPte(Address);
|
||||
if (Pte->u.Hard.Valid)
|
||||
{
|
||||
MiLockProcessWorkingSetUnsafe(Process, PsGetCurrentThread());
|
||||
Accessed = Accessed || Pte->u.Hard.Accessed;
|
||||
Pte->u.Hard.Accessed = 0;
|
||||
|
||||
/* Be sure this is still valid. */
|
||||
if (MmIsAddressValid(Address))
|
||||
{
|
||||
PMMPTE Pte = MiAddressToPte(Address);
|
||||
Accessed = Accessed || Pte->u.Hard.Accessed;
|
||||
Pte->u.Hard.Accessed = 0;
|
||||
|
||||
/* There is no need to invalidate, the balancer thread is never on a user process */
|
||||
//KeInvalidateTlbEntry(Address);
|
||||
}
|
||||
|
||||
MiUnlockProcessWorkingSet(Process, PsGetCurrentThread());
|
||||
/* There is no need to invalidate, the balancer thread is never on a user process */
|
||||
//KeInvalidateTlbEntry(Address);
|
||||
}
|
||||
|
||||
MmUnlockAddressSpace(&Process->Vm);
|
||||
|
|
Loading…
Reference in a new issue