ReactOS 0.4.15-dev-8614-gbc76250
|
Go to the source code of this file.
Classes | |
struct | _POOL_DESCRIPTOR |
struct | _POOL_HEADER |
struct | _POOL_TRACKER_TABLE |
struct | _POOL_TRACKER_BIG_PAGES |
struct | _MI_LARGE_PAGE_DRIVER_ENTRY |
struct | _PHYSICAL_MEMORY_RUN |
struct | _PHYSICAL_MEMORY_DESCRIPTOR |
struct | _MMCOLOR_TABLES |
struct | _MI_LARGE_PAGE_RANGES |
struct | _MMVIEW |
struct | _MMSESSION |
struct | _MM_SESSION_SPACE_FLAGS |
struct | _MM_SESSION_SPACE |
Enumerations | |
enum | _MMSYSTEM_PTE_POOL_TYPE { SystemPteSpace , NonPagedPoolExpansion , MaximumPtePoolTypes } |
enum | _MI_PFN_CACHE_ATTRIBUTE { MiNonCached , MiCached , MiWriteCombined , MiNotMapped } |
#define IMAGE_SCN_PROTECTION_MASK (IMAGE_SCN_MEM_WRITE | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_EXECUTE) |
#define MI_GET_NEXT_COLOR | ( | ) | (MI_GET_PAGE_COLOR(++MmSystemPageColor)) |
#define MI_GET_NEXT_PROCESS_COLOR | ( | x | ) | (MI_GET_PAGE_COLOR(++(x)->NextPageColor)) |
#define MI_IS_SESSION_ADDRESS | ( | Address | ) | (((Address) >= MmSessionBase) && ((Address) < MiSessionSpaceEnd)) |
#define MI_IS_SESSION_IMAGE_ADDRESS | ( | Address | ) | (((Address) >= MiSessionImageStart) && ((Address) < MiSessionImageEnd)) |
#define MI_IS_SESSION_PTE | ( | Pte | ) | ((((PMMPTE)Pte) >= MiSessionBasePte) && (((PMMPTE)Pte) < MiSessionLastPte)) |
#define MI_IS_SYSTEM_PAGE_TABLE_ADDRESS | ( | Address | ) | (((Address) >= (PVOID)MiAddressToPte(MmSystemRangeStart)) && ((Address) <= (PVOID)PTE_TOP)) |
#define MI_LOWEST_VAD_ADDRESS (PVOID)MM_LOWEST_USER_ADDRESS |
#define MI_SESSION_DATA_PAGES_MAXIMUM (MM_ALLOCATION_GRANULARITY / PAGE_SIZE) |
#define MI_SESSION_TAG_PAGES_MAXIMUM (MM_ALLOCATION_GRANULARITY / PAGE_SIZE) |
#define MM_DECOMMIT (MM_ZERO_ACCESS | MM_GUARDPAGE) |
#define MM_NOACCESS (MM_ZERO_ACCESS | MM_WRITECOMBINE) |
#define MM_OUTSWAPPED_KSTACK (MM_EXECUTE_WRITECOPY | MM_WRITECOMBINE) |
#define POOL_LISTS_PER_PAGE (PAGE_SIZE / POOL_BLOCK_SIZE) |
#define POOL_MAX_ALLOC (PAGE_SIZE - (sizeof(POOL_HEADER) + POOL_BLOCK_SIZE)) |
#define SYSTEM_PD_SIZE (PPE_PER_PAGE * PD_SIZE) |
typedef struct _MM_SESSION_SPACE MM_SESSION_SPACE |
typedef struct _MMCOLOR_TABLES MMCOLOR_TABLES |
typedef struct _MMSESSION MMSESSION |
typedef struct _MI_LARGE_PAGE_RANGES * PMI_LARGE_PAGE_RANGES |
typedef struct _MM_SESSION_SPACE * PMM_SESSION_SPACE |
typedef struct _MMCOLOR_TABLES * PMMCOLOR_TABLES |
typedef struct _MMSESSION * PMMSESSION |
typedef struct _POOL_DESCRIPTOR POOL_DESCRIPTOR |
typedef struct _POOL_HEADER POOL_HEADER |
typedef struct _PHYSICAL_MEMORY_RUN * PPHYSICAL_MEMORY_RUN |
typedef struct _POOL_DESCRIPTOR * PPOOL_DESCRIPTOR |
typedef struct _POOL_HEADER * PPOOL_HEADER |
typedef struct _POOL_TRACKER_TABLE * PPOOL_TRACKER_TABLE |
Enumerator | |
---|---|
MiNonCached | |
MiCached | |
MiWriteCombined | |
MiNotMapped |
Definition at line 408 of file miarm.h.
Enumerator | |
---|---|
SystemPteSpace | |
NonPagedPoolExpansion | |
MaximumPtePoolTypes |
Definition at line 401 of file miarm.h.
C_ASSERT | ( | POOL_BLOCK_SIZE | = =sizeof(LIST_ENTRY) | ) |
C_ASSERT | ( | sizeof(POOL_HEADER) | = =POOL_BLOCK_SIZE | ) |
VOID NTAPI ExInitializePoolDescriptor | ( | IN PPOOL_DESCRIPTOR | PoolDescriptor, |
IN POOL_TYPE | PoolType, | ||
IN ULONG | PoolIndex, | ||
IN ULONG | Threshold, | ||
IN PVOID | PoolLock | ||
) |
Definition at line 969 of file expool.c.
Referenced by InitializePool(), and MiInitializeSessionPool().
Definition at line 1020 of file expool.c.
Referenced by MiBuildPagedPool(), and MiInitMachineDependent().
FORCEINLINE VOID MI_ERASE_PTE | ( | IN PMMPTE | PointerPte | ) |
Definition at line 1006 of file miarm.h.
Referenced by MiDeletePte(), MiDeleteSystemPageableVm(), MiDeleteVirtualAddresses(), MiUnmapLockedPagesInUserSpace(), and MmFreeSpecialPool().
Definition at line 1557 of file miarm.h.
Referenced by MiDeleteVirtualAddresses(), MiQueryAddressState(), and NtAllocateVirtualMemory().
FORCEINLINE BOOLEAN MI_IS_MAPPED_PTE | ( | PMMPTE | PointerPte | ) |
FORCEINLINE BOOLEAN MI_IS_PHYSICAL_ADDRESS | ( | IN PVOID | Address | ) |
Definition at line 945 of file miarm.h.
Referenced by MiDispatchFault(), MiFindInitializationCode(), MiFreeInitializationCode(), MiProtectFreeNonPagedPool(), MiReleaseProcessReferenceToSessionDataPage(), MiSetPagingOfDriver(), MiUnProtectFreeNonPagedPool(), MiWriteProtectSystemImage(), MmChangeKernelResourceSectionProtection(), MmFreeDriverInitialization(), MmFreeLoaderBlock(), MmMakeKernelResourceSectionWritable(), and MmProbeAndLockPages().
FORCEINLINE BOOLEAN MI_IS_PROCESS_WORKING_SET | ( | PMMSUPPORT | WorkingSet | ) |
Definition at line 661 of file miarm.h.
Referenced by MiInitializeWorkingSetList(), and MmWorkingSetManager().
FORCEINLINE BOOLEAN MI_IS_WS_UNSAFE | ( | IN PEPROCESS | Process | ) |
Definition at line 1114 of file miarm.h.
Referenced by MiLockProcessWorkingSet(), MiLockProcessWorkingSetShared(), MiLockProcessWorkingSetUnsafe(), MiUnlockProcessWorkingSet(), MiUnlockProcessWorkingSetForFault(), MiUnlockProcessWorkingSetShared(), and MiUnlockProcessWorkingSetUnsafe().
FORCEINLINE VOID MI_MAKE_HARDWARE_PTE | ( | IN PMMPTE | NewPte, |
IN PMMPTE | MappingPte, | ||
IN ULONG_PTR | ProtectionMask, | ||
IN PFN_NUMBER | PageFrameNumber | ||
) |
Definition at line 807 of file miarm.h.
Referenced by MiCompleteProtoPteFault(), MiResolveDemandZeroFault(), MiResolvePageFileFault(), MiResolveProtoPteFault(), MmArmAccessFault(), and MmCreateVirtualMappingUnsafeEx().
FORCEINLINE VOID MI_MAKE_HARDWARE_PTE_KERNEL | ( | IN PMMPTE | NewPte, |
IN PMMPTE | MappingPte, | ||
IN ULONG_PTR | ProtectionMask, | ||
IN PFN_NUMBER | PageFrameNumber | ||
) |
Definition at line 773 of file miarm.h.
Referenced by MiArchCreateProcessAddressSpace(), MmChangeKernelResourceSectionProtection(), MmCreateKernelStack(), MmGrowKernelStackEx(), and MmInitSystem().
FORCEINLINE VOID MI_MAKE_HARDWARE_PTE_USER | ( | IN PMMPTE | NewPte, |
IN PMMPTE | MappingPte, | ||
IN ULONG_PTR | ProtectionMask, | ||
IN PFN_NUMBER | PageFrameNumber | ||
) |
Definition at line 827 of file miarm.h.
Referenced by MiCompleteProtoPteFault(), MiFlushTbAndCapture(), MiMapLockedPagesInUserSpace(), MiResolveDemandZeroFault(), MiResolveProtoPteFault(), and MmArmAccessFault().
Definition at line 854 of file miarm.h.
Definition at line 883 of file miarm.h.
FORCEINLINE VOID MI_MAKE_TRANSITION_PTE | ( | _Out_ PMMPTE | NewPte, |
_In_ PFN_NUMBER | Page, | ||
_In_ ULONG | Protection | ||
) |
Definition at line 929 of file miarm.h.
Referenced by MiResolvePageFileFault(), and TrimWsList().
FORCEINLINE PMMPFN MI_PFN_ELEMENT | ( | IN PFN_NUMBER | Pfn | ) |
Definition at line 1574 of file miarm.h.
Referenced by MiDecrementReferenceCount(), MiDecrementShareCount(), MiDispatchFault(), MiFindContiguousPages(), MiGetPageProtection(), MiInitializeAndChargePfn(), MiInitializePfn(), MiInitializePfnAndMakePteValid(), MiInitializePfnForOtherProcess(), MiInsertPageInFreeList(), MiInsertPageInList(), MiInsertStandbyListAtFront(), MiMapLockedPagesInUserSpace(), MiReleaseProcessReferenceToSessionDataPage(), MiRemoveAnyPage(), MiRemovePageByColor(), MiRemoveZeroPage(), MiResolveDemandZeroFault(), MiResolvePageFileFault(), MiResolveProtoPteFault(), MiSegmentDelete(), MiSessionCommitPageTables(), MiSessionCreateInternal(), MiUnlinkFreeOrZeroedPage(), MiUnlinkPageFromList(), MmArmAccessFault(), and MmFreeSpecialPool().
Definition at line 977 of file miarm.h.
Referenced by MiFlushTbAndCapture(), MiSetSystemCodeProtection(), MmArmAccessFault(), and MmChangeKernelResourceSectionProtection().
Definition at line 1035 of file miarm.h.
Referenced by MmArmAccessFault().
Definition at line 992 of file miarm.h.
Referenced by MiAccessCheck(), MiAddMappedPtes(), MiAllocatePoolPages(), MiDecommitPages(), MiDecrementShareCount(), MiMapViewOfDataSection(), MiProcessValidPteList(), MiProtectFreeNonPagedPool(), MiProtectVirtualMemory(), MiResolvePageFileFault(), MmArmAccessFault(), MmCommitSessionMappedView(), MmCreateKernelStack(), MmGrowKernelStackEx(), and NtAllocateVirtualMemory().
Definition at line 1018 of file miarm.h.
Referenced by MiAllocatePoolPages(), MiBuildPagedPool(), MiFillSystemPageDirectory(), MiInitializeAndChargePfn(), MiRemoveMappedPtes(), MiSessionCommitPageTables(), MiSessionCreateInternal(), and MiSessionInitializeWorkingSetList().
Definition at line 959 of file miarm.h.
Referenced by MiAllocatePoolPages(), MiArchCreateProcessAddressSpace(), MiBuildPagedPool(), MiCompleteProtoPteFault(), MiCopyPfn(), MiDispatchFault(), MiInitializeColorTables(), MiInitializePfnAndMakePteValid(), MiInitMachineDependent(), MiLoadImageSection(), MiMapLockedPagesInUserSpace(), MiMapPageInHyperSpace(), MiMapPagesInZeroSpace(), MiMapPDEs(), MiMapPfnDatabase(), MiMapPPEs(), MiMapPTEs(), MiReloadBootLoadedDrivers(), MiResolveDemandZeroFault(), MiResolvePageFileFault(), MiResolveProtoPteFault(), MiResolveTransitionFault(), MiSessionCreateInternal(), MiUnProtectFreeNonPagedPool(), MiZeroPfn(), MmAllocateNonCachedMemory(), MmArmAccessFault(), MmCreateKernelStack(), MmGrowKernelStackEx(), MmMapIoSpace(), and MmMapLockedPagesSpecifyCache().
FORCEINLINE BOOLEAN MI_WS_OWNER | ( | IN PEPROCESS | Process | ) |
Definition at line 1077 of file miarm.h.
Referenced by MiUnlockProcessWorkingSet(), MiUnlockProcessWorkingSetForFault(), MiUnlockProcessWorkingSetShared(), and MiUnlockProcessWorkingSetUnsafe().
FORCEINLINE KIRQL MiAcquireExpansionLock | ( | VOID | ) |
Definition at line 1531 of file miarm.h.
Referenced by MiArchCreateProcessAddressSpace(), MiDereferenceSessionFinal(), MiSessionAddProcess(), MiSessionInitializeWorkingSetList(), MiSessionLeader(), MiSessionRemoveProcess(), MmDeleteProcessAddressSpace(), MmGetSessionById(), and MmWorkingSetManager().
PMDL NTAPI MiAllocatePagesForMdl | ( | IN PHYSICAL_ADDRESS | LowAddress, |
IN PHYSICAL_ADDRESS | HighAddress, | ||
IN PHYSICAL_ADDRESS | SkipBytes, | ||
IN SIZE_T | TotalBytes, | ||
IN MI_PFN_CACHE_ATTRIBUTE | CacheAttribute, | ||
IN ULONG | Flags | ||
) |
Definition at line 182 of file freelist.c.
Referenced by MmAllocateNonCachedMemory(), MmAllocatePagesForMdl(), and MmAllocatePagesForMdlEx().
TABLE_SEARCH_RESULT NTAPI MiCheckForConflictingNode | ( | IN ULONG_PTR | StartVpn, |
IN ULONG_PTR | EndVpn, | ||
IN PMM_AVL_TABLE | Table, | ||
OUT PMMADDRESS_NODE * | NodeOrParent | ||
) |
Definition at line 150 of file vadnode.c.
Referenced by MiInsertVadEx(), MiMapLockedPagesInUserSpace(), MiProtectVirtualMemory(), MmLocateMemoryAreaByAddress(), MmLocateMemoryAreaByRegion(), and NtAllocateVirtualMemory().
PVOID NTAPI MiCheckForContiguousMemory | ( | IN PVOID | BaseAddress, |
IN PFN_NUMBER | BaseAddressPages, | ||
IN PFN_NUMBER | SizeInPages, | ||
IN PFN_NUMBER | LowestPfn, | ||
IN PFN_NUMBER | HighestPfn, | ||
IN PFN_NUMBER | BoundaryPfn, | ||
IN MI_PFN_CACHE_ATTRIBUTE | CacheAttribute | ||
) |
Definition at line 214 of file contmem.c.
Referenced by MiAllocateContiguousMemory().
Definition at line 479 of file pagfault.c.
Referenced by MiDeletePte(), MiInitializePfn(), MiInitializePfnAndMakePteValid(), and MmArmAccessFault().
NTSTATUS NTAPI MiCheckSecuredVad | ( | IN PMMVAD | Vad, |
IN PVOID | Base, | ||
IN SIZE_T | Size, | ||
IN ULONG | ProtectionMask | ||
) |
Definition at line 903 of file vadnode.c.
Referenced by MiUnmapViewOfSection(), and NtAllocateVirtualMemory().
Definition at line 508 of file mminit.c.
Referenced by MmArmInitSystem().
FORCEINLINE BOOLEAN MiConvertSharedWorkingSetLockToExclusive | ( | _In_ PETHREAD | Thread, |
_In_ PMMSUPPORT | Vm | ||
) |
Definition at line 1428 of file miarm.h.
Referenced by MmWorkingSetManager().
FORCEINLINE USHORT MiDecrementPageTableReferences | ( | IN PVOID | Address | ) |
Definition at line 2492 of file miarm.h.
Referenced by _Success_(), MiDeletePde(), MiDeleteVirtualAddresses(), MiUnmapLockedPagesInUserSpace(), and MmDeletePageFileMapping().
Definition at line 1236 of file pfnlist.c.
Referenced by MiDecrementShareCount(), MiDeletePte(), MiDereferencePfnAndDropLockCount(), and MmFreePagesFromMdl().
Definition at line 1141 of file pfnlist.c.
Referenced by FreeWsleIndex(), MiDeletePte(), MiDeleteSystemPageableVm(), MiFreeContiguousMemory(), MiProcessValidPteList(), MiProtectVirtualMemory(), MiReleaseProcessReferenceToSessionDataPage(), MiRemoveMappedPtes(), MiUnmapLockedPagesInUserSpace(), MmDeleteKernelStack(), MmDeleteProcessAddressSpace(), MmFreeLoaderBlock(), MmFreeSpecialPool(), and TrimWsList().
Definition at line 2949 of file section.c.
Referenced by MmpDeleteSection().
Definition at line 2526 of file miarm.h.
Referenced by _Success_(), MiDeleteVirtualAddresses(), MiUnmapLockedPagesInUserSpace(), and MmDeletePageFileMapping().
VOID NTAPI MiDeletePte | ( | IN PMMPTE | PointerPte, |
IN PVOID | VirtualAddress, | ||
IN PEPROCESS | CurrentProcess, | ||
IN PMMPTE | PrototypePte | ||
) |
Definition at line 369 of file virtual.c.
Referenced by MiDeletePde(), MiDeleteVirtualAddresses(), MiResolveProtoPteFault(), and MmArmAccessFault().
PFN_COUNT NTAPI MiDeleteSystemPageableVm | ( | IN PMMPTE | PointerPte, |
IN PFN_NUMBER | PageCount, | ||
IN ULONG | Flags, | ||
OUT PPFN_NUMBER | ValidPages | ||
) |
Definition at line 275 of file virtual.c.
Referenced by MiFreeInitializationCode(), MiFreePoolPages(), MmFreeDriverInitialization(), and MmFreeSpecialPool().
Definition at line 530 of file virtual.c.
Referenced by MiRemoveMappedView(), MmCleanProcessAddressSpace(), MmDeleteTeb(), and NtFreeVirtualMemory().
FORCEINLINE VOID MiDereferencePfnAndDropLockCount | ( | IN PMMPFN | Pfn1 | ) |
Definition at line 1615 of file miarm.h.
Referenced by MI_UNLOCK_VA(), MiCompleteProtoPteFault(), MiDispatchFault(), and MmUnlockPages().
FORCEINLINE ULONG_PTR MiDetermineUserGlobalPteMask | ( | IN PVOID | PointerPte | ) |
Definition at line 736 of file miarm.h.
Referenced by MI_MAKE_HARDWARE_PTE(), and MiResolveTransitionFault().
FORCEINLINE VOID MiDropLockCount | ( | IN PMMPFN | Pfn1 | ) |
Definition at line 1585 of file miarm.h.
Referenced by MiResolveTransitionFault().
PFN_NUMBER NTAPI MiFindContiguousPages | ( | IN PFN_NUMBER | LowestPfn, |
IN PFN_NUMBER | HighestPfn, | ||
IN PFN_NUMBER | BoundaryPfn, | ||
IN PFN_NUMBER | SizeInPages, | ||
IN MEMORY_CACHING_TYPE | CacheType | ||
) |
Definition at line 22 of file contmem.c.
Referenced by MiFindContiguousMemory().
NTSTATUS NTAPI MiFindEmptyAddressRangeDownBasedTree | ( | IN SIZE_T | Length, |
IN ULONG_PTR | BoundaryAddress, | ||
IN ULONG_PTR | Alignment, | ||
IN PMM_AVL_TABLE | Table, | ||
OUT PULONG_PTR | Base | ||
) |
Definition at line 799 of file vadnode.c.
Referenced by MmCreateArm3Section().
TABLE_SEARCH_RESULT NTAPI MiFindEmptyAddressRangeDownTree | ( | IN SIZE_T | Length, |
IN ULONG_PTR | BoundaryAddress, | ||
IN ULONG_PTR | Alignment, | ||
IN PMM_AVL_TABLE | Table, | ||
OUT PULONG_PTR | Base, | ||
OUT PMMADDRESS_NODE * | Parent | ||
) |
Definition at line 681 of file vadnode.c.
Referenced by MiInsertVadEx(), and MmFindGap().
TABLE_SEARCH_RESULT NTAPI MiFindEmptyAddressRangeInTree | ( | IN SIZE_T | Length, |
IN ULONG_PTR | Alignment, | ||
IN PMM_AVL_TABLE | Table, | ||
OUT PMMADDRESS_NODE * | PreviousVad, | ||
OUT PULONG_PTR | Base | ||
) |
Definition at line 584 of file vadnode.c.
Referenced by MiInsertVadEx(), MiMapLockedPagesInUserSpace(), and MmFindGap().
PMMADDRESS_NODE NTAPI MiGetNextNode | ( | IN PMMADDRESS_NODE | Node | ) |
Definition at line 549 of file vadnode.c.
Referenced by MiFindEmptyAddressRangeInTree(), and MiQueryMemoryBasicInformation().
Definition at line 1355 of file virtual.c.
Referenced by MiProtectVirtualMemory(), MiQueryAddressState(), and NtAllocateVirtualMemory().
PMMADDRESS_NODE NTAPI MiGetPreviousNode | ( | IN PMMADDRESS_NODE | Node | ) |
Definition at line 513 of file vadnode.c.
Referenced by MiFindEmptyAddressRangeDownBasedTree(), and MiFindEmptyAddressRangeDownTree().
FORCEINLINE USHORT MiIncrementPageTableReferences | ( | IN PVOID | Address | ) |