ReactOS 0.4.16-dev-1007-g2e85425
|
Go to the source code of this file.
Macros | |
#define | NDEBUG |
#define | MODULE_INVOLVED_IN_ARM3 |
#define | MI_MAPPED_COPY_PAGES 14 |
#define | MI_POOL_COPY_BYTES 512 |
#define | MI_MAX_TRANSFER_SIZE 64 * 1024 |
FORCEINLINE BOOLEAN MI_IS_LOCKED_VA | ( | PMMPFN | Pfn1, |
ULONG | LockType | ||
) |
Definition at line 3237 of file virtual.c.
Referenced by MiLockVirtualMemory(), and MiUnlockVirtualMemory().
FORCEINLINE VOID MI_LOCK_VA | ( | PMMPFN | Pfn1, |
ULONG | LockType | ||
) |
Definition at line 3254 of file virtual.c.
Referenced by MiLockVirtualMemory().
FORCEINLINE VOID MI_UNLOCK_VA | ( | PMMPFN | Pfn1, |
ULONG | LockType | ||
) |
Definition at line 3275 of file virtual.c.
Referenced by MiUnlockVirtualMemory().
ULONG NTAPI MiCalculatePageCommitment | ( | IN ULONG_PTR | StartingAddress, |
IN ULONG_PTR | EndingAddress, | ||
IN PMMVAD | Vad, | ||
IN PEPROCESS | Process | ||
) |
Definition at line 42 of file virtual.c.
Referenced by NtFreeVirtualMemory().
|
static |
FIXME: this might be a memory area for a section view...
Definition at line 3296 of file virtual.c.
Referenced by MiLockVirtualMemory(), and MiUnlockVirtualMemory().
ULONG NTAPI MiDecommitPages | ( | IN PVOID | StartingAddress, |
IN PMMPTE | EndingPte, | ||
IN PEPROCESS | Process, | ||
IN PMMVAD | Vad | ||
) |
Definition at line 2587 of file virtual.c.
Referenced by NtFreeVirtualMemory().
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().
VOID NTAPI MiDeleteVirtualAddresses | ( | _In_ ULONG_PTR | Va, |
_In_ ULONG_PTR | EndingAddress, | ||
_In_opt_ PMMVAD | Vad | ||
) |
Definition at line 530 of file virtual.c.
Referenced by MiRemoveMappedView(), MmCleanProcessAddressSpace(), MmDeleteTeb(), and NtFreeVirtualMemory().
NTSTATUS NTAPI MiDoMappedCopy | ( | IN PEPROCESS | SourceProcess, |
IN PVOID | SourceAddress, | ||
IN PEPROCESS | TargetProcess, | ||
OUT PVOID | TargetAddress, | ||
IN SIZE_T | BufferSize, | ||
IN KPROCESSOR_MODE | PreviousMode, | ||
OUT PSIZE_T | ReturnSize | ||
) |
Definition at line 795 of file virtual.c.
Referenced by MmCopyVirtualMemory().
NTSTATUS NTAPI MiDoPoolCopy | ( | IN PEPROCESS | SourceProcess, |
IN PVOID | SourceAddress, | ||
IN PEPROCESS | TargetProcess, | ||
OUT PVOID | TargetAddress, | ||
IN SIZE_T | BufferSize, | ||
IN KPROCESSOR_MODE | PreviousMode, | ||
OUT PSIZE_T | ReturnSize | ||
) |
Definition at line 1020 of file virtual.c.
Referenced by MmCopyVirtualMemory().
VOID NTAPI MiFlushTbAndCapture | ( | IN PMMVAD | FoundVad, |
IN PMMPTE | PointerPte, | ||
IN ULONG | ProtectionMask, | ||
IN PMMPFN | Pfn1, | ||
IN BOOLEAN | CaptureDirtyBit | ||
) |
Definition at line 1821 of file section.c.
Referenced by MiProtectVirtualMemory().
LONG MiGetExceptionInfo | ( | IN PEXCEPTION_POINTERS | ExceptionInfo, |
OUT PBOOLEAN | HaveBadAddress, | ||
OUT PULONG_PTR | BadAddress | ||
) |
Definition at line 750 of file virtual.c.
Referenced by MiDoMappedCopy(), and MiDoPoolCopy().
Definition at line 1356 of file virtual.c.
Referenced by MiProtectVirtualMemory(), MiQueryAddressState(), and NtAllocateVirtualMemory().
BOOLEAN NTAPI MiIsEntireRangeCommitted | ( | IN ULONG_PTR | StartingAddress, |
IN ULONG_PTR | EndingAddress, | ||
IN PMMVAD | Vad, | ||
IN PEPROCESS | Process | ||
) |
Definition at line 1999 of file virtual.c.
Referenced by MiProtectVirtualMemory().
|
static |
Definition at line 3341 of file virtual.c.
Referenced by NtLockVirtualMemory(), and RunTest().
VOID NTAPI MiMakePdeExistAndMakeValid | ( | IN PMMPDE | PointerPde, |
IN PEPROCESS | TargetProcess, | ||
IN KIRQL | OldIrql | ||
) |
Definition at line 2441 of file virtual.c.
Referenced by _Success_(), MiDecommitPages(), MiMapLockedPagesInUserSpace(), MiProtectVirtualMemory(), MmCreatePageFileMapping(), MmCreateVirtualMappingUnsafeEx(), MmDeletePageFileMapping(), MmGetPageFileMapping(), MmGetPageProtect(), MmGetPfnForProcess(), MmIsDisabledPage(), MmIsPagePresent(), MmIsPageSwapEntry(), MmSetDirtyBit(), MmSetPageProtect(), and NtAllocateVirtualMemory().
ULONG NTAPI MiMakeSystemAddressValid | ( | IN PVOID | PageTableVirtualAddress, |
IN PEPROCESS | CurrentProcess | ||
) |
Definition at line 183 of file virtual.c.
Referenced by MiCalculatePageCommitment(), MiDeleteVirtualAddresses(), MiIsEntireRangeCommitted(), MiIsPageTablePresent(), MiMakePdeExistAndMakeValid(), and MiQueryAddressState().
Definition at line 235 of file virtual.c.
Referenced by MiGetPageProtection(), and MiSegmentDelete().
Definition at line 2535 of file virtual.c.
Referenced by MiDecommitPages().
NTSTATUS NTAPI MiProtectVirtualMemory | ( | IN PEPROCESS | Process, |
IN OUT PVOID * | BaseAddress, | ||
IN OUT PSIZE_T | NumberOfBytesToProtect, | ||
IN ULONG | NewAccessProtection, | ||
OUT PULONG OldAccessProtection | OPTIONAL | ||
) |
Definition at line 2155 of file virtual.c.
Referenced by CcPreparePinWrite(), CcpUnpinData(), NtAllocateVirtualMemory(), and NtProtectVirtualMemory().
ULONG NTAPI MiQueryAddressState | ( | IN PVOID | Va, |
IN PMMVAD | Vad, | ||
IN PEPROCESS | TargetProcess, | ||
OUT PULONG | ReturnedProtect, | ||
OUT PVOID * | NextVa | ||
) |
Definition at line 1471 of file virtual.c.
Referenced by MiQueryMemoryBasicInformation().
NTSTATUS NTAPI MiQueryMemoryBasicInformation | ( | IN HANDLE | ProcessHandle, |
IN PVOID | BaseAddress, | ||
OUT PVOID | MemoryInformation, | ||
IN SIZE_T | MemoryInformationLength, | ||
OUT PSIZE_T | ReturnLength | ||
) |
Definition at line 1662 of file virtual.c.
Referenced by NtQueryVirtualMemory().
|
static |
Definition at line 3660 of file virtual.c.
Referenced by NtUnlockVirtualMemory().
NTSTATUS NTAPI MmCopyVirtualMemory | ( | IN PEPROCESS | SourceProcess, |
IN PVOID | SourceAddress, | ||
IN PEPROCESS | TargetProcess, | ||
OUT PVOID | TargetAddress, | ||
IN SIZE_T | BufferSize, | ||
IN KPROCESSOR_MODE | PreviousMode, | ||
OUT PSIZE_T | ReturnSize | ||
) |
Definition at line 1271 of file virtual.c.
Referenced by LpcpCopyRequestData(), NtReadVirtualMemory(), and NtWriteVirtualMemory().
NTSTATUS NTAPI MmFlushVirtualMemory | ( | IN PEPROCESS | Process, |
IN OUT PVOID * | BaseAddress, | ||
IN OUT PSIZE_T | RegionSize, | ||
OUT PIO_STATUS_BLOCK | IoStatusBlock | ||
) |
Definition at line 1342 of file virtual.c.
Referenced by NtFlushVirtualMemory().
PHYSICAL_ADDRESS NTAPI MmGetPhysicalAddress | ( | PVOID | Address | ) |
Definition at line 5671 of file virtual.c.
PVOID NTAPI MmGetVirtualForPhysical | ( | IN PHYSICAL_ADDRESS | PhysicalAddress | ) |
Definition at line 2754 of file virtual.c.
Referenced by EngSecureMem(), and EngSecureMemForRead().
Definition at line 2767 of file virtual.c.
Referenced by EngUnsecureMem().
NTSTATUS NTAPI NtAllocateVirtualMemory | ( | IN HANDLE | ProcessHandle, |
IN OUT PVOID * | UBaseAddress, | ||
IN ULONG_PTR | ZeroBits, | ||
IN OUT PSIZE_T | URegionSize, | ||
IN ULONG | AllocationType, | ||
IN ULONG | Protect | ||
) |
Definition at line 4452 of file virtual.c.
Referenced by Allocate(), AllocateGuarded(), AllocateReadOnly(), BaseCreateStack(), BaseCreateVDMEnvironment(), BasePushProcessParameters(), CheckAdjacentVADs(), CheckAlignment(), CheckSize(), CheckSomeDefaultAddresses(), CopyLoop(), CreateProcessInternalW(), LsapAllocateClientBuffer(), LsapEnumLogonSessions(), LsapGetLogonSessionData(), MakeReadOnly(), MemInitialize(), PsaiMalloc(), RtlCreateEnvironment(), RtlCreateQueryDebugBuffer(), RtlpDebugBufferCommit(), RtlSetEnvironmentVariable(), START_TEST(), Test_ImageSection(), Test_ImageSection2(), Test_NtFreeVirtualMemory(), Test_PageFileSection(), TestFreeNoAccess(), TestReadWrite(), TH32CreateSnapshot(), VDDAllocMem(), VDDDeInstallMemoryHook(), and VirtualAllocEx().
NTSTATUS NTAPI NtFlushInstructionCache | ( | _In_ HANDLE | ProcessHandle, |
_In_opt_ PVOID | BaseAddress, | ||
_In_ SIZE_T | FlushSize | ||
) |
Definition at line 3004 of file virtual.c.
Referenced by FixupDll(), FlushInstructionCache(), and WriteProcessMemory().
NTSTATUS NTAPI NtFlushVirtualMemory | ( | IN HANDLE | ProcessHandle, |
IN OUT PVOID * | BaseAddress, | ||
IN OUT PSIZE_T | NumberOfBytesToFlush, | ||
OUT PIO_STATUS_BLOCK | IoStatusBlock | ||
) |
Definition at line 3995 of file virtual.c.
Referenced by FlushViewOfFile(), and Test_ImageSection().
NTSTATUS NTAPI NtFreeVirtualMemory | ( | IN HANDLE | ProcessHandle, |
IN PVOID * | UBaseAddress, | ||
IN PSIZE_T | URegionSize, | ||
IN ULONG | FreeType | ||
) |
Definition at line 5187 of file virtual.c.
Referenced by Allocate(), AllocateGuarded(), BaseCreateStack(), BaseCreateVDMEnvironment(), BaseDestroyVDMEnvironment(), BaseFreeThreadStack(), CheckAdjacentVADs(), CheckAlignment(), CheckSize(), CheckSomeDefaultAddresses(), CopyLoop(), CreateProcessInternalW(), DeleteFiber(), Free(), FreeGuarded(), FreeReadOnly(), LsapFreeClientBuffer(), MakeReadOnly(), MemCleanup(), PsaiFree(), RtlDestroyEnvironment(), RtlDestroyHandleTable(), RtlDestroyQueryDebugBuffer(), RtlFreeUserThreadStack(), RtlSetEnvironmentVariable(), START_TEST(), Test_NtFreeVirtualMemory(), Test_NtFreeVirtualMemory_Parameters(), Test_PageFileSection(), TestFreeNoAccess(), TestReadWrite(), TH32CreateSnapshot(), TH32FreeAllocatedResources(), VDDFreeMem(), VDDInstallMemoryHook(), and VirtualFreeEx().
NTSTATUS NTAPI NtGetWriteWatch | ( | IN HANDLE | ProcessHandle, |
IN ULONG | Flags, | ||
IN PVOID | BaseAddress, | ||
IN SIZE_T | RegionSize, | ||
IN PVOID * | UserAddressArray, | ||
OUT PULONG_PTR | EntriesInUserAddressArray, | ||
OUT PULONG | Granularity | ||
) |
Definition at line 4117 of file virtual.c.
Referenced by GetWriteWatch().
NTSTATUS NTAPI NtLockVirtualMemory | ( | IN HANDLE | ProcessHandle, |
IN OUT PVOID * | BaseAddress, | ||
IN OUT PSIZE_T | NumberOfBytesToLock, | ||
IN ULONG | MapType | ||
) |
Definition at line 3489 of file virtual.c.
Referenced by VirtualLock().
NTSTATUS NTAPI NtProtectVirtualMemory | ( | IN HANDLE | ProcessHandle, |
IN OUT PVOID * | UnsafeBaseAddress, | ||
IN OUT SIZE_T * | UnsafeNumberOfBytesToProtect, | ||
IN ULONG | NewAccessProtection, | ||
OUT PULONG | UnsafeOldAccessProtection | ||
) |
Definition at line 3071 of file virtual.c.
Referenced by AVrfpSnapDllImports(), BaseCreateStack(), BasepCheckForReadOnlyResource(), LdrpSnapIAT(), SeiPatchNewImport(), Test_PageFileSection(), TestFreeNoAccess(), TestReadWrite(), VirtualProtectEx(), Write(), and WriteProcessMemory().
NTSTATUS NTAPI NtQueryVirtualMemory | ( | IN HANDLE | ProcessHandle, |
IN PVOID | BaseAddress, | ||
IN MEMORY_INFORMATION_CLASS | MemoryInformationClass, | ||
OUT PVOID | MemoryInformation, | ||
IN SIZE_T | MemoryInformationLength, | ||
OUT PSIZE_T | ReturnLength | ||
) |
Definition at line 4369 of file virtual.c.
Referenced by BasepCheckForReadOnlyResource(), CheckAdjacentVADs(), GetMappedFileNameW(), infinite_recursive(), InitFunctionPtrs(), LdrpInit(), QueryWorkingSet(), QueryWorkingSetEx(), RtlCreateEnvironment(), RtlSetEnvironmentVariable(), START_TEST(), and VirtualQueryEx().
NTSTATUS NTAPI NtReadVirtualMemory | ( | IN HANDLE | ProcessHandle, |
IN PVOID | BaseAddress, | ||
OUT PVOID | Buffer, | ||
IN SIZE_T | NumberOfBytesToRead, | ||
OUT PSIZE_T NumberOfBytesRead | OPTIONAL | ||
) |
Definition at line 2776 of file virtual.c.
Referenced by CON_API(), ConSrvConnect(), CreateProcessInternalW(), FixupDll(), InitFunctionPtrs(), LsapCallAuthenticationPackage(), LsapCopyFromClientBuffer(), LsapCopyLocalGroups(), LsapLogonUser(), PsaEnumerateProcessModules(), ReadProcessMemory(), RtlFreeUserThreadStack(), RtlpQueryRemoteProcessModules(), RtlReadOutOfProcessMemoryStream(), UserpCaptureStringParameters(), and UserpGetClientFileName().
NTSTATUS NTAPI NtResetWriteWatch | ( | IN HANDLE | ProcessHandle, |
IN PVOID | BaseAddress, | ||
IN SIZE_T | RegionSize | ||
) |
Definition at line 4288 of file virtual.c.
Referenced by ResetWriteWatch().
NTSTATUS NTAPI NtUnlockVirtualMemory | ( | IN HANDLE | ProcessHandle, |
IN OUT PVOID * | BaseAddress, | ||
IN OUT PSIZE_T | NumberOfBytesToUnlock, | ||
IN ULONG | MapType | ||
) |
Definition at line 3825 of file virtual.c.
Referenced by VirtualUnlock().
NTSTATUS NTAPI NtWriteVirtualMemory | ( | IN HANDLE | ProcessHandle, |
IN PVOID | BaseAddress, | ||
IN PVOID | Buffer, | ||
IN SIZE_T | NumberOfBytesToWrite, | ||
OUT PSIZE_T NumberOfBytesWritten | OPTIONAL | ||
) |
Definition at line 2890 of file virtual.c.
Referenced by BasePushProcessParameters(), LsapCopyToClientBuffer(), LsapEnumLogonSessions(), LsapGetLogonSessionData(), StuffStdHandle(), Write(), and WriteProcessMemory().