mirror of
https://github.com/reactos/reactos.git
synced 2024-10-03 16:05:37 +00:00
[NTOSKRNL]: Fix broken UsedPageTableEntries/page table ref counting ASSERTs. The reference can be UP TO 1024, inclusive, but no more. This might fix a bunch of assertions related to this. Thanks to Richard for catching this one during his VAD work.
svn path=/trunk/; revision=55921
This commit is contained in:
parent
d485558f04
commit
1401fbea9b
|
@ -412,7 +412,7 @@ MiDeleteVirtualAddresses(IN ULONG_PTR Va,
|
|||
{
|
||||
DPRINT("Decrement used PTEs by address: %lx\n", Va);
|
||||
(*UsedPageTableEntries)--;
|
||||
ASSERT((*UsedPageTableEntries) < PTE_COUNT);
|
||||
ASSERT((*UsedPageTableEntries) <= PTE_COUNT);
|
||||
DPRINT("Refs: %lx\n", (*UsedPageTableEntries));
|
||||
|
||||
/* Check if the PTE is actually mapped in */
|
||||
|
|
|
@ -1978,7 +1978,7 @@ MmPageOutDeleteMapping(PVOID Context, PEPROCESS Process, PVOID Address)
|
|||
if((Address < MmSystemRangeStart) && (Process != PageOutContext->CallingProcess))
|
||||
{
|
||||
Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)]--;
|
||||
ASSERT(Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] < PTE_COUNT);
|
||||
ASSERT(Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] <= PTE_COUNT);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2158,7 +2158,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
|
|||
if(Address < MmSystemRangeStart)
|
||||
{
|
||||
Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)]--;
|
||||
ASSERT(Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] < PTE_COUNT);
|
||||
ASSERT(Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] <= PTE_COUNT);
|
||||
}
|
||||
#endif
|
||||
MmSetSavedSwapEntryPage(Page, 0);
|
||||
|
@ -2186,7 +2186,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
|
|||
if(Address < MmSystemRangeStart)
|
||||
{
|
||||
Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)]--;
|
||||
ASSERT(Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] < PTE_COUNT);
|
||||
ASSERT(Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] <= PTE_COUNT);
|
||||
}
|
||||
#endif
|
||||
MmSetSavedSwapEntryPage(Page, 0);
|
||||
|
@ -2209,7 +2209,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
|
|||
if(Address < MmSystemRangeStart)
|
||||
{
|
||||
Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)]--;
|
||||
ASSERT(Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] < PTE_COUNT);
|
||||
ASSERT(Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] <= PTE_COUNT);
|
||||
}
|
||||
#endif
|
||||
if (SwapEntry != 0)
|
||||
|
@ -2247,7 +2247,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
|
|||
if(Address < MmSystemRangeStart)
|
||||
{
|
||||
Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)]--;
|
||||
ASSERT(Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] < PTE_COUNT);
|
||||
ASSERT(Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] <= PTE_COUNT);
|
||||
}
|
||||
#endif
|
||||
MmReleasePageMemoryConsumer(MC_USER, Page);
|
||||
|
@ -2413,7 +2413,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
|
|||
if(Address < MmSystemRangeStart)
|
||||
{
|
||||
Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)]--;
|
||||
ASSERT(Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] < PTE_COUNT);
|
||||
ASSERT(Process->Vm.VmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] <= PTE_COUNT);
|
||||
}
|
||||
#endif
|
||||
Entry = MAKE_SWAP_SSE(SwapEntry);
|
||||
|
|
Loading…
Reference in a new issue