mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
[NTOSKRNL]
Remove obsolete FreePage parameter from MmDeleteVirtualMapping svn path=/trunk/; revision=64532
This commit is contained in:
parent
c9252b32bd
commit
0a3873c1c2
11 changed files with 11 additions and 40 deletions
2
reactos/ntoskrnl/cache/section/data.c
vendored
2
reactos/ntoskrnl/cache/section/data.c
vendored
|
@ -771,7 +771,7 @@ MmFreeCacheSectionPage(PVOID Context,
|
||||||
DPRINT("Removing page %p:%I64x -> %x\n", Segment, Offset.QuadPart, Entry);
|
DPRINT("Removing page %p:%I64x -> %x\n", Segment, Offset.QuadPart, Entry);
|
||||||
MmSetSavedSwapEntryPage(Page, 0);
|
MmSetSavedSwapEntryPage(Page, 0);
|
||||||
MmDeleteRmap(Page, Process, Address);
|
MmDeleteRmap(Page, Process, Address);
|
||||||
MmDeleteVirtualMapping(Process, Address, FALSE, NULL, NULL);
|
MmDeleteVirtualMapping(Process, Address, NULL, NULL);
|
||||||
MmReleasePageMemoryConsumer(MC_CACHE, Page);
|
MmReleasePageMemoryConsumer(MC_CACHE, Page);
|
||||||
}
|
}
|
||||||
if (SwapEntry != 0)
|
if (SwapEntry != 0)
|
||||||
|
|
2
reactos/ntoskrnl/cache/section/swapout.c
vendored
2
reactos/ntoskrnl/cache/section/swapout.c
vendored
|
@ -309,7 +309,7 @@ MmPageOutCacheSection(PMMSUPPORT AddressSpace,
|
||||||
}
|
}
|
||||||
|
|
||||||
MmDeleteRmap(Required->Page[0], Process, Address);
|
MmDeleteRmap(Required->Page[0], Process, Address);
|
||||||
MmDeleteVirtualMapping(Process, Address, FALSE, Dirty, &OurPage);
|
MmDeleteVirtualMapping(Process, Address, Dirty, &OurPage);
|
||||||
ASSERT(OurPage == Required->Page[0]);
|
ASSERT(OurPage == Required->Page[0]);
|
||||||
|
|
||||||
/* Note: this releases the reference held by this address space only. */
|
/* Note: this releases the reference held by this address space only. */
|
||||||
|
|
|
@ -1158,7 +1158,6 @@ NTAPI
|
||||||
MmDeleteVirtualMapping(
|
MmDeleteVirtualMapping(
|
||||||
struct _EPROCESS *Process,
|
struct _EPROCESS *Process,
|
||||||
PVOID Address,
|
PVOID Address,
|
||||||
BOOLEAN FreePage,
|
|
||||||
BOOLEAN* WasDirty,
|
BOOLEAN* WasDirty,
|
||||||
PPFN_NUMBER Page
|
PPFN_NUMBER Page
|
||||||
);
|
);
|
||||||
|
|
|
@ -451,7 +451,6 @@ NTAPI
|
||||||
MmDeleteVirtualMapping(
|
MmDeleteVirtualMapping(
|
||||||
PEPROCESS Process,
|
PEPROCESS Process,
|
||||||
PVOID Address,
|
PVOID Address,
|
||||||
BOOLEAN FreePage,
|
|
||||||
BOOLEAN* WasDirty,
|
BOOLEAN* WasDirty,
|
||||||
PPFN_NUMBER Page)
|
PPFN_NUMBER Page)
|
||||||
{
|
{
|
||||||
|
@ -469,9 +468,6 @@ MmDeleteVirtualMapping(
|
||||||
if (OldPte.u.Hard.Valid)
|
if (OldPte.u.Hard.Valid)
|
||||||
{
|
{
|
||||||
Pfn = OldPte.u.Hard.PageFrameNumber;
|
Pfn = OldPte.u.Hard.PageFrameNumber;
|
||||||
|
|
||||||
//if (FreePage)
|
|
||||||
//MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Pfn = 0;
|
Pfn = 0;
|
||||||
|
|
|
@ -180,7 +180,6 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
MmDeleteVirtualMapping(IN PEPROCESS Process,
|
MmDeleteVirtualMapping(IN PEPROCESS Process,
|
||||||
IN PVOID Address,
|
IN PVOID Address,
|
||||||
IN BOOLEAN FreePage,
|
|
||||||
OUT PBOOLEAN WasDirty,
|
OUT PBOOLEAN WasDirty,
|
||||||
OUT PPFN_NUMBER Page)
|
OUT PPFN_NUMBER Page)
|
||||||
{
|
{
|
||||||
|
|
|
@ -474,7 +474,6 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
MmDeleteVirtualMapping(IN PEPROCESS Process,
|
MmDeleteVirtualMapping(IN PEPROCESS Process,
|
||||||
IN PVOID Address,
|
IN PVOID Address,
|
||||||
IN BOOLEAN FreePage,
|
|
||||||
OUT PBOOLEAN WasDirty,
|
OUT PBOOLEAN WasDirty,
|
||||||
OUT PPFN_NUMBER Page)
|
OUT PPFN_NUMBER Page)
|
||||||
{
|
{
|
||||||
|
|
|
@ -358,7 +358,7 @@ MmGetPfnForProcess(PEPROCESS Process,
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
|
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address,
|
||||||
BOOLEAN* WasDirty, PPFN_NUMBER Page)
|
BOOLEAN* WasDirty, PPFN_NUMBER Page)
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Delete a virtual mapping
|
* FUNCTION: Delete a virtual mapping
|
||||||
|
@ -369,8 +369,8 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
|
||||||
ULONG Pte;
|
ULONG Pte;
|
||||||
PULONG Pt;
|
PULONG Pt;
|
||||||
|
|
||||||
DPRINT("MmDeleteVirtualMapping(%p, %p, %u, %p, %p)\n",
|
DPRINT("MmDeleteVirtualMapping(%p, %p, %p, %p)\n",
|
||||||
Process, Address, FreePage, WasDirty, Page);
|
Process, Address, WasDirty, Page);
|
||||||
|
|
||||||
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
|
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
|
||||||
|
|
||||||
|
@ -410,12 +410,6 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
|
||||||
}
|
}
|
||||||
|
|
||||||
Pfn = PTE_TO_PFN(Pte);
|
Pfn = PTE_TO_PFN(Pte);
|
||||||
|
|
||||||
if (FreePage)
|
|
||||||
{
|
|
||||||
MmReleasePageMemoryConsumer(MC_SYSTEM, Pfn);
|
|
||||||
Pfn = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -622,7 +622,7 @@ MmGetPfnForProcess(PEPROCESS Process,
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
|
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address,
|
||||||
BOOLEAN* WasDirty, PPFN_NUMBER Page)
|
BOOLEAN* WasDirty, PPFN_NUMBER Page)
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Delete a virtual mapping
|
* FUNCTION: Delete a virtual mapping
|
||||||
|
@ -632,7 +632,7 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
|
||||||
PFN_NUMBER Pfn;
|
PFN_NUMBER Pfn;
|
||||||
|
|
||||||
DPRINT("MmDeleteVirtualMapping(%x, %x, %d, %x, %x)\n",
|
DPRINT("MmDeleteVirtualMapping(%x, %x, %d, %x, %x)\n",
|
||||||
Process, Address, FreePage, WasDirty, Page);
|
Process, Address, WasDirty, Page);
|
||||||
if (Ke386Pae)
|
if (Ke386Pae)
|
||||||
{
|
{
|
||||||
ULONGLONG Pte;
|
ULONGLONG Pte;
|
||||||
|
@ -671,11 +671,6 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
|
||||||
Pfn = 0;
|
Pfn = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FreePage && WasValid)
|
|
||||||
{
|
|
||||||
MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return some information to the caller
|
* Return some information to the caller
|
||||||
*/
|
*/
|
||||||
|
@ -726,11 +721,6 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
|
||||||
Pfn = 0;
|
Pfn = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FreePage && WasValid)
|
|
||||||
{
|
|
||||||
MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return some information to the caller
|
* Return some information to the caller
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -837,7 +837,7 @@ MmFreeMemoryArea(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MmDeleteVirtualMapping(Process, (PVOID)Address, FALSE, &Dirty, &Page);
|
MmDeleteVirtualMapping(Process, (PVOID)Address, &Dirty, &Page);
|
||||||
}
|
}
|
||||||
if (FreePage != NULL)
|
if (FreePage != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -170,7 +170,7 @@ MmGetPfnForProcess(PEPROCESS Process,
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
|
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address,
|
||||||
BOOLEAN* WasDirty, PPFN_NUMBER Page)
|
BOOLEAN* WasDirty, PPFN_NUMBER Page)
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Delete a virtual mapping
|
* FUNCTION: Delete a virtual mapping
|
||||||
|
@ -179,17 +179,12 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
|
||||||
ppc_map_info_t info = { 0 };
|
ppc_map_info_t info = { 0 };
|
||||||
|
|
||||||
DPRINT("MmDeleteVirtualMapping(%x, %x, %d, %x, %x)\n",
|
DPRINT("MmDeleteVirtualMapping(%x, %x, %d, %x, %x)\n",
|
||||||
Process, Address, FreePage, WasDirty, Page);
|
Process, Address, WasDirty, Page);
|
||||||
|
|
||||||
info.proc = Process ? (int)Process->UniqueProcessId : 0;
|
info.proc = Process ? (int)Process->UniqueProcessId : 0;
|
||||||
info.addr = (vaddr_t)Address;
|
info.addr = (vaddr_t)Address;
|
||||||
MmuInqPage(&info, 1);
|
MmuInqPage(&info, 1);
|
||||||
|
|
||||||
if (FreePage && info.phys)
|
|
||||||
{
|
|
||||||
MmReleasePageMemoryConsumer(MC_NPPOOL, info.phys >> PAGE_SHIFT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return some information to the caller
|
* Return some information to the caller
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1763,7 +1763,7 @@ MmAccessFaultSectionView(PMMSUPPORT AddressSpace,
|
||||||
}
|
}
|
||||||
|
|
||||||
MmDeleteRmap(OldPage, Process, PAddress);
|
MmDeleteRmap(OldPage, Process, PAddress);
|
||||||
MmDeleteVirtualMapping(Process, PAddress, FALSE, NULL, NULL);
|
MmDeleteVirtualMapping(Process, PAddress, NULL, NULL);
|
||||||
MmCreatePageFileMapping(Process, PAddress, MM_WAIT_ENTRY);
|
MmCreatePageFileMapping(Process, PAddress, MM_WAIT_ENTRY);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1836,7 +1836,6 @@ MmPageOutDeleteMapping(PVOID Context, PEPROCESS Process, PVOID Address)
|
||||||
|
|
||||||
MmDeleteVirtualMapping(Process,
|
MmDeleteVirtualMapping(Process,
|
||||||
Address,
|
Address,
|
||||||
FALSE,
|
|
||||||
&WasDirty,
|
&WasDirty,
|
||||||
&Page);
|
&Page);
|
||||||
if (WasDirty)
|
if (WasDirty)
|
||||||
|
|
Loading…
Reference in a new issue