mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:32:59 +00:00
[NTOS:MM]
- Add an informational DPRINT for testbot in addition to asserting in MmFreeMemoryArea CORE-7445 svn path=/trunk/; revision=60970
This commit is contained in:
parent
8c5fbba82d
commit
f9f0df8522
1 changed files with 14 additions and 7 deletions
|
@ -848,10 +848,10 @@ MmFreeMemoryArea(
|
||||||
#if (_MI_PAGING_LEVELS == 2)
|
#if (_MI_PAGING_LEVELS == 2)
|
||||||
/* Remove page table reference */
|
/* Remove page table reference */
|
||||||
ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
|
ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
|
||||||
if((SwapEntry || Page) && ((PVOID)Address < MmSystemRangeStart))
|
if ((SwapEntry || Page) && ((PVOID)Address < MmSystemRangeStart))
|
||||||
{
|
{
|
||||||
ASSERT(AddressSpace != MmGetKernelAddressSpace());
|
ASSERT(AddressSpace != MmGetKernelAddressSpace());
|
||||||
if(MmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] == 0)
|
if (MmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] == 0)
|
||||||
{
|
{
|
||||||
/* No PTE relies on this PDE. Release it */
|
/* No PTE relies on this PDE. Release it */
|
||||||
KIRQL OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
|
KIRQL OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
|
||||||
|
@ -1180,16 +1180,23 @@ MmDeleteProcessAddressSpace(PEPROCESS Process)
|
||||||
/* Acquire PFN lock */
|
/* Acquire PFN lock */
|
||||||
OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
|
OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
|
||||||
|
|
||||||
for(Address = MI_LOWEST_VAD_ADDRESS;
|
for (Address = MI_LOWEST_VAD_ADDRESS;
|
||||||
Address < MM_HIGHEST_VAD_ADDRESS;
|
Address < MM_HIGHEST_VAD_ADDRESS;
|
||||||
Address =(PVOID)((ULONG_PTR)Address + (PAGE_SIZE * PTE_COUNT)))
|
Address =(PVOID)((ULONG_PTR)Address + (PAGE_SIZE * PTE_COUNT)))
|
||||||
{
|
{
|
||||||
/* At this point all references should be dead */
|
/* At this point all references should be dead */
|
||||||
ASSERT(MmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] == 0);
|
if (MmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] != 0)
|
||||||
|
{
|
||||||
|
DPRINT1("Process %p, Address %p, UsedPageTableEntries %lu\n",
|
||||||
|
Process,
|
||||||
|
Address,
|
||||||
|
MmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)]);
|
||||||
|
ASSERT(MmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(Address)] == 0);
|
||||||
|
}
|
||||||
pointerPde = MiAddressToPde(Address);
|
pointerPde = MiAddressToPde(Address);
|
||||||
/* Unlike in ARM3, we don't necesarrily free the PDE page as soon as reference reaches 0,
|
/* Unlike in ARM3, we don't necesarrily free the PDE page as soon as reference reaches 0,
|
||||||
* so we must clean up a bit when process closes */
|
* so we must clean up a bit when process closes */
|
||||||
if(pointerPde->u.Hard.Valid)
|
if (pointerPde->u.Hard.Valid)
|
||||||
MiDeletePte(pointerPde, MiPdeToPte(pointerPde), Process, NULL);
|
MiDeletePte(pointerPde, MiPdeToPte(pointerPde), Process, NULL);
|
||||||
ASSERT(pointerPde->u.Hard.Valid == 0);
|
ASSERT(pointerPde->u.Hard.Valid == 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue