ReactOS 0.4.15-dev-7834-g00c4b3d
|
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 3275 of file virtual.c.
Referenced by MiLockVirtualMemory(), and MiUnlockVirtualMemory().
FORCEINLINE VOID MI_LOCK_VA | ( | PMMPFN | Pfn1, |
ULONG | LockType | ||
) |
Definition at line 3292 of file virtual.c.
Referenced by MiLockVirtualMemory().
FORCEINLINE VOID MI_UNLOCK_VA | ( | PMMPFN | Pfn1, |
ULONG | LockType | ||
) |
Definition at line 3313 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 3334 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 2625 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().
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 792 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 1017 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 2015 of file section.c.
Referenced by MiProtectVirtualMemory(), and MiSetProtectionOnSection().
LONG MiGetExceptionInfo | ( | IN PEXCEPTION_POINTERS | ExceptionInfo, |
OUT PBOOLEAN | HaveBadAddress, | ||
OUT PULONG_PTR | BadAddress | ||
) |
Definition at line 747 of file virtual.c.
Referenced by MiDoMappedCopy(), and MiDoPoolCopy().
Definition at line 1353 of file virtual.c.
Referenced by MiProtectVirtualMemory(), MiQueryAddressState(), MiSetProtectionOnSection(), and NtAllocateVirtualMemory().
BOOLEAN NTAPI MiIsEntireRangeCommitted | ( | IN ULONG_PTR | StartingAddress, |
IN ULONG_PTR | EndingAddress, | ||
IN PMMVAD | Vad, | ||
IN PEPROCESS | Process | ||
) |
Definition at line 2000 of file virtual.c.
Referenced by MiProtectVirtualMemory().
|
static |
Definition at line 3379 of file virtual.c.
Referenced by NtLockVirtualMemory(), and RunTest().
VOID NTAPI MiMakePdeExistAndMakeValid | ( | IN PMMPDE | PointerPde, |
IN PEPROCESS | TargetProcess, | ||
IN KIRQL | OldIrql | ||
) |
Definition at line 2479 of file virtual.c.
Referenced by _Success_(), MiDecommitPages(), MiMapLockedPagesInUserSpace(), MiProtectVirtualMemory(), MiSetProtectionOnSection(), 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 2573 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 2196 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 1468 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 1659 of file virtual.c.
Referenced by NtQueryVirtualMemory().
NTSTATUS NTAPI MiRosProtectVirtualMemory | ( | IN PEPROCESS | Process, |
IN OUT PVOID * | BaseAddress, | ||
IN OUT PSIZE_T | NumberOfBytesToProtect, | ||
IN ULONG | NewAccessProtection, | ||
OUT PULONG OldAccessProtection | OPTIONAL | ||
) |
Definition at line 2156 of file virtual.c.
Referenced by MiProtectVirtualMemory().
|
static |
Definition at line 3698 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 1268 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 1339 of file virtual.c.
Referenced by NtFlushVirtualMemory().
PHYSICAL_ADDRESS NTAPI MmGetPhysicalAddress | ( | PVOID | Address | ) |
Definition at line 5734 of file virtual.c.
PVOID NTAPI MmGetVirtualForPhysical | ( | IN PHYSICAL_ADDRESS | PhysicalAddress | ) |
Definition at line 2792 of file virtual.c.
Referenced by EngSecureMem(), and EngSecureMemForRead().
Definition at line 2805 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 4490 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 3042 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 4033 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 5228 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 4155 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 3527 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 3109 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 4407 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 2814 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 4326 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 3863 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 2928 of file virtual.c.
Referenced by BasePushProcessParameters(), LsapCopyToClientBuffer(), LsapEnumLogonSessions(), LsapGetLogonSessionData(), StuffStdHandle(), Write(), and WriteProcessMemory().