Author: tkreuzer
Date: Sun Oct 5 08:49:15 2014
New Revision: 64533
URL:
http://svn.reactos.org/svn/reactos?rev=64533&view=rev
Log:
[NTOSKRNL]
Kill MiZeroFillSection
Modified:
trunk/reactos/ntoskrnl/cache/copysup.c
trunk/reactos/ntoskrnl/cache/section/data.c
trunk/reactos/ntoskrnl/cache/section/newmm.h
Modified: trunk/reactos/ntoskrnl/cache/copysup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/copysup.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/copysup.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/copysup.c [iso-8859-1] Sun Oct 5 08:49:15 2014
@@ -186,7 +186,6 @@
WriteBuf,
Bcb->BaseAddress);
- //MiZeroFillSection(WriteBuf, &CurrentOffset, WriteLen);
RtlCopyMemory(WriteBuf, ((PCHAR)Buffer) + Count, WriteLen);
Count += WriteLen;
Length -= WriteLen;
Modified: trunk/reactos/ntoskrnl/cache/section/data.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/dat…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] Sun Oct 5 08:49:15 2014
@@ -112,78 +112,6 @@
//DPRINT("MmUnlockSectionSegment(%p,%s:%d)\n", Segment, file, line);
}
-NTSTATUS
-NTAPI
-MiZeroFillSection(PVOID Address, PLARGE_INTEGER FileOffsetPtr, ULONG Length)
-{
- PFN_NUMBER Page;
- PMMSUPPORT AddressSpace;
- PMEMORY_AREA MemoryArea;
- PMM_SECTION_SEGMENT Segment;
- LARGE_INTEGER FileOffset = *FileOffsetPtr, End, FirstMapped;
- KIRQL OldIrql;
-
- DPRINT("MiZeroFillSection(Address %p, Offset 0x%I64x,Length 0x%lx)\n",
- Address,
- FileOffset.QuadPart,
- Length);
-
- AddressSpace = MmGetKernelAddressSpace();
-
- MmLockAddressSpace(AddressSpace);
- MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, Address);
- MmUnlockAddressSpace(AddressSpace);
- if (!MemoryArea || MemoryArea->Type != MEMORY_AREA_SECTION_VIEW ||
MemoryArea->DeleteInProgress)
- {
- return STATUS_NOT_MAPPED_DATA;
- }
-
- Segment = MemoryArea->Data.SectionData.Segment;
- End.QuadPart = FileOffset.QuadPart + Length;
- End.LowPart = PAGE_ROUND_DOWN(End.LowPart);
- FileOffset.LowPart = PAGE_ROUND_UP(FileOffset.LowPart);
- FirstMapped.QuadPart = MemoryArea->Data.SectionData.ViewOffset.QuadPart;
- DPRINT("Pulling zero pages for %08x%08x-%08x%08x\n",
- FileOffset.u.HighPart, FileOffset.u.LowPart,
- End.u.HighPart, End.u.LowPart);
-
- while (FileOffset.QuadPart < End.QuadPart)
- {
- PVOID CurrentAddress;
- ULONG_PTR Entry;
-
- if (!NT_SUCCESS(MmRequestPageMemoryConsumer(MC_CACHE, TRUE, &Page)))
- break;
-
- MmLockAddressSpace(AddressSpace);
- MmLockSectionSegment(Segment);
-
- Entry = MmGetPageEntrySectionSegment(Segment, &FileOffset);
- if (Entry == 0)
- {
- MmSetPageEntrySectionSegment(Segment, &FileOffset, MAKE_PFN_SSE(Page));
- CurrentAddress = ((PCHAR)MemoryArea->StartingAddress) +
FileOffset.QuadPart - FirstMapped.QuadPart;
-
- OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
- MmReferencePage(Page);
- KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql);
-
- MmCreateVirtualMapping(NULL, CurrentAddress, PAGE_READWRITE, &Page, 1);
- MmInsertRmap(Page, NULL, CurrentAddress);
- }
- else
- {
- MmReleasePageMemoryConsumer(MC_CACHE, Page);
- }
-
- MmUnlockSectionSegment(Segment);
- MmUnlockAddressSpace(AddressSpace);
-
- FileOffset.QuadPart += PAGE_SIZE;
- }
- return STATUS_SUCCESS;
-}
-
/*
MiFlushMappedSection
Modified: trunk/reactos/ntoskrnl/cache/section/newmm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/new…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/newmm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/newmm.h [iso-8859-1] Sun Oct 5 08:49:15 2014
@@ -262,12 +262,6 @@
_In_ BOOLEAN Locked,
_Inout_ PMM_REQUIRED_RESOURCES Required);
-NTSTATUS
-NTAPI
-MiZeroFillSection(PVOID Address,
- PLARGE_INTEGER FileOffsetPtr,
- ULONG Length);
-
VOID
MmPageOutDeleteMapping(PVOID Context,
PEPROCESS Process,