Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

mm.h

Go to the documentation of this file.
00001 /*-- BUILD Version: 0005 // Increment this if a change has global effects 00002 00003 Copyright (c) 1989 Microsoft Corporation 00004 00005 Module Name: 00006 00007 mm.h 00008 00009 Abstract: 00010 00011 This module contains the public data structures and procedure 00012 prototypes for the memory management system. 00013 00014 Author: 00015 00016 Lou Perazzoli (loup) 20-Mar-1989 00017 00018 Revision History: 00019 00020 --*/ 00021 00022 #ifndef _MM_ 00023 #define _MM_ 00024 00025 // 00026 // Virtual bias applied when the kernel image was loaded. 00027 // 00028 00029 extern ULONG_PTR MmVirtualBias; 00030 00031 #define MAX_PHYSICAL_MEMORY_FRAGMENTS 20 00032 00033 typedef struct _PHYSICAL_MEMORY_RUN { 00034 PFN_NUMBER BasePage; 00035 PFN_NUMBER PageCount; 00036 } PHYSICAL_MEMORY_RUN, *PPHYSICAL_MEMORY_RUN; 00037 00038 typedef struct _PHYSICAL_MEMORY_DESCRIPTOR { 00039 ULONG NumberOfRuns; 00040 PFN_NUMBER NumberOfPages; 00041 PHYSICAL_MEMORY_RUN Run[1]; 00042 } PHYSICAL_MEMORY_DESCRIPTOR, *PPHYSICAL_MEMORY_DESCRIPTOR; 00043 00044 // 00045 // Physical memory blocks. 00046 // 00047 00048 extern PPHYSICAL_MEMORY_DESCRIPTOR MmPhysicalMemoryBlock; 00049 00050 // 00051 // The allocation granularity is 64k. 00052 // 00053 00054 #define MM_ALLOCATION_GRANULARITY ((ULONG)0x10000) 00055 00056 // 00057 // Maximum read ahead size for cache operations. 00058 // 00059 00060 #define MM_MAXIMUM_READ_CLUSTER_SIZE (15) 00061 00062 #if defined(_NTDRIVER_) || defined(_NTDDK_) || defined(_NTIFS_) || defined(_NTHAL_) 00063 00064 // begin_ntddk begin_wdm begin_nthal begin_ntifs 00065 // 00066 // Indicates the system may do I/O to physical addresses above 4 GB. 00067 // 00068 00069 extern PBOOLEAN Mm64BitPhysicalAddress; 00070 00071 // end_ntddk end_wdm end_nthal end_ntifs 00072 00073 #else 00074 00075 // 00076 // Indicates the system may do I/O to physical addresses above 4 GB. 00077 // 00078 00079 extern BOOLEAN Mm64BitPhysicalAddress; 00080 00081 #endif 00082 00083 // begin_ntddk begin_wdm begin_nthal begin_ntifs 00084 00085 // 00086 // Define maximum disk transfer size to be used by MM and Cache Manager, 00087 // so that packet-oriented disk drivers can optimize their packet allocation 00088 // to this size. 00089 // 00090 00091 #define MM_MAXIMUM_DISK_IO_SIZE (0x10000) 00092 00093 //++ 00094 // 00095 // ULONG_PTR 00096 // ROUND_TO_PAGES ( 00097 // IN ULONG_PTR Size 00098 // ) 00099 // 00100 // Routine Description: 00101 // 00102 // The ROUND_TO_PAGES macro takes a size in bytes and rounds it up to a 00103 // multiple of the page size. 00104 // 00105 // NOTE: This macro fails for values 0xFFFFFFFF - (PAGE_SIZE - 1). 00106 // 00107 // Arguments: 00108 // 00109 // Size - Size in bytes to round up to a page multiple. 00110 // 00111 // Return Value: 00112 // 00113 // Returns the size rounded up to a multiple of the page size. 00114 // 00115 //-- 00116 00117 #define ROUND_TO_PAGES(Size) (((ULONG_PTR)(Size) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)) 00118 00119 //++ 00120 // 00121 // ULONG 00122 // BYTES_TO_PAGES ( 00123 // IN ULONG Size 00124 // ) 00125 // 00126 // Routine Description: 00127 // 00128 // The BYTES_TO_PAGES macro takes the size in bytes and calculates the 00129 // number of pages required to contain the bytes. 00130 // 00131 // Arguments: 00132 // 00133 // Size - Size in bytes. 00134 // 00135 // Return Value: 00136 // 00137 // Returns the number of pages required to contain the specified size. 00138 // 00139 //-- 00140 00141 #define BYTES_TO_PAGES(Size) ((ULONG)((ULONG_PTR)(Size) >> PAGE_SHIFT) + \ 00142 (((ULONG)(Size) & (PAGE_SIZE - 1)) != 0)) 00143 00144 //++ 00145 // 00146 // ULONG 00147 // BYTE_OFFSET ( 00148 // IN PVOID Va 00149 // ) 00150 // 00151 // Routine Description: 00152 // 00153 // The BYTE_OFFSET macro takes a virtual address and returns the byte offset 00154 // of that address within the page. 00155 // 00156 // Arguments: 00157 // 00158 // Va - Virtual address. 00159 // 00160 // Return Value: 00161 // 00162 // Returns the byte offset portion of the virtual address. 00163 // 00164 //-- 00165 00166 #define BYTE_OFFSET(Va) ((ULONG)((LONG_PTR)(Va) & (PAGE_SIZE - 1))) 00167 00168 //++ 00169 // 00170 // PVOID 00171 // PAGE_ALIGN ( 00172 // IN PVOID Va 00173 // ) 00174 // 00175 // Routine Description: 00176 // 00177 // The PAGE_ALIGN macro takes a virtual address and returns a page-aligned 00178 // virtual address for that page. 00179 // 00180 // Arguments: 00181 // 00182 // Va - Virtual address. 00183 // 00184 // Return Value: 00185 // 00186 // Returns the page aligned virtual address. 00187 // 00188 //-- 00189 00190 #define PAGE_ALIGN(Va) ((PVOID)((ULONG_PTR)(Va) & ~(PAGE_SIZE - 1))) 00191 00192 //++ 00193 // 00194 // ULONG 00195 // ADDRESS_AND_SIZE_TO_SPAN_PAGES ( 00196 // IN PVOID Va, 00197 // IN ULONG Size 00198 // ) 00199 // 00200 // Routine Description: 00201 // 00202 // The ADDRESS_AND_SIZE_TO_SPAN_PAGES macro takes a virtual address and 00203 // size and returns the number of pages spanned by the size. 00204 // 00205 // Arguments: 00206 // 00207 // Va - Virtual address. 00208 // 00209 // Size - Size in bytes. 00210 // 00211 // Return Value: 00212 // 00213 // Returns the number of pages spanned by the size. 00214 // 00215 //-- 00216 00217 #define ADDRESS_AND_SIZE_TO_SPAN_PAGES(Va,Size) \ 00218 (((((Size) - 1) >> PAGE_SHIFT) + \ 00219 (((((ULONG)(Size-1)&(PAGE_SIZE-1)) + (PtrToUlong(Va) & (PAGE_SIZE -1)))) >> PAGE_SHIFT)) + 1L) 00220 00221 #define COMPUTE_PAGES_SPANNED(Va, Size) \ 00222 ((ULONG)((((ULONG_PTR)(Va) & (PAGE_SIZE -1)) + (Size) + (PAGE_SIZE - 1)) >> PAGE_SHIFT)) 00223 00224 // end_ntddk end_wdm end_nthal end_ntifs 00225 00226 //++ 00227 // 00228 // BOOLEAN 00229 // IS_SYSTEM_ADDRESS 00230 // IN PVOID Va, 00231 // ) 00232 // 00233 // Routine Description: 00234 // 00235 // This macro takes a virtual address and returns TRUE if the virtual address 00236 // is within system space, FALSE otherwise. 00237 // 00238 // Arguments: 00239 // 00240 // Va - Virtual address. 00241 // 00242 // Return Value: 00243 // 00244 // Returns TRUE is the address is in system space. 00245 // 00246 //-- 00247 00248 #define IS_SYSTEM_ADDRESS(VA) ((VA) >= MM_SYSTEM_RANGE_START) 00249 00250 // begin_ntddk begin_wdm begin_nthal begin_ntifs 00251 00252 //++ 00253 // PPFN_NUMBER 00254 // MmGetMdlPfnArray ( 00255 // IN PMDL Mdl 00256 // ) 00257 // 00258 // Routine Description: 00259 // 00260 // The MmGetMdlPfnArray routine returns the virtual address of the 00261 // first element of the array of physical page numbers associated with 00262 // the MDL. 00263 // 00264 // Arguments: 00265 // 00266 // Mdl - Pointer to an MDL. 00267 // 00268 // Return Value: 00269 // 00270 // Returns the virtual address of the first element of the array of 00271 // physical page numbers associated with the MDL. 00272 // 00273 //-- 00274 00275 #define MmGetMdlPfnArray(Mdl) ((PPFN_NUMBER)(Mdl + 1)) 00276 00277 //++ 00278 // 00279 // PVOID 00280 // MmGetMdlVirtualAddress ( 00281 // IN PMDL Mdl 00282 // ) 00283 // 00284 // Routine Description: 00285 // 00286 // The MmGetMdlVirtualAddress returns the virtual address of the buffer 00287 // described by the Mdl. 00288 // 00289 // Arguments: 00290 // 00291 // Mdl - Pointer to an MDL. 00292 // 00293 // Return Value: 00294 // 00295 // Returns the virtual address of the buffer described by the Mdl 00296 // 00297 //-- 00298 00299 #define MmGetMdlVirtualAddress(Mdl) \ 00300 ((PVOID) ((PCHAR) ((Mdl)->StartVa) + (Mdl)->ByteOffset)) 00301 00302 //++ 00303 // 00304 // ULONG 00305 // MmGetMdlByteCount ( 00306 // IN PMDL Mdl 00307 // ) 00308 // 00309 // Routine Description: 00310 // 00311 // The MmGetMdlByteCount returns the length in bytes of the buffer 00312 // described by the Mdl. 00313 // 00314 // Arguments: 00315 // 00316 // Mdl - Pointer to an MDL. 00317 // 00318 // Return Value: 00319 // 00320 // Returns the byte count of the buffer described by the Mdl 00321 // 00322 //-- 00323 00324 #define MmGetMdlByteCount(Mdl) ((Mdl)->ByteCount) 00325 00326 //++ 00327 // 00328 // ULONG 00329 // MmGetMdlByteOffset ( 00330 // IN PMDL Mdl 00331 // ) 00332 // 00333 // Routine Description: 00334 // 00335 // The MmGetMdlByteOffset returns the byte offset within the page 00336 // of the buffer described by the Mdl. 00337 // 00338 // Arguments: 00339 // 00340 // Mdl - Pointer to an MDL. 00341 // 00342 // Return Value: 00343 // 00344 // Returns the byte offset within the page of the buffer described by the Mdl 00345 // 00346 //-- 00347 00348 #define MmGetMdlByteOffset(Mdl) ((Mdl)->ByteOffset) 00349 00350 //++ 00351 // 00352 // PVOID 00353 // MmGetMdlStartVa ( 00354 // IN PMDL Mdl 00355 // ) 00356 // 00357 // Routine Description: 00358 // 00359 // The MmGetMdlBaseVa returns the virtual address of the buffer 00360 // described by the Mdl rounded down to the nearest page. 00361 // 00362 // Arguments: 00363 // 00364 // Mdl - Pointer to an MDL. 00365 // 00366 // Return Value: 00367 // 00368 // Returns the returns the starting virtual address of the MDL. 00369 // 00370 // 00371 //-- 00372 00373 #define MmGetMdlBaseVa(Mdl) ((Mdl)->StartVa) 00374 00375 // end_ntddk end_wdm end_nthal end_ntifs 00376 00377 // 00378 // Section object type. 00379 // 00380 00381 extern POBJECT_TYPE MmSectionObjectType; 00382 00383 // 00384 // Number of pages to read in a single I/O if possible. 00385 // 00386 00387 extern ULONG MmReadClusterSize; 00388 00389 // 00390 // Number of colors in system. 00391 // 00392 00393 extern ULONG MmNumberOfColors; 00394 00395 // 00396 // Number of physical pages. 00397 // 00398 00399 extern PFN_COUNT MmNumberOfPhysicalPages; 00400 00401 00402 // 00403 // Size of system cache in pages. 00404 // 00405 00406 extern PFN_COUNT MmSizeOfSystemCacheInPages; 00407 00408 // 00409 // System cache working set. 00410 // 00411 00412 extern MMSUPPORT MmSystemCacheWs; 00413 00414 // 00415 // Working set manager event. 00416 // 00417 00418 extern KEVENT MmWorkingSetManagerEvent; 00419 00420 // begin_ntddk begin_wdm begin_nthal begin_ntifs 00421 typedef enum _MM_SYSTEM_SIZE { 00422 MmSmallSystem, 00423 MmMediumSystem, 00424 MmLargeSystem 00425 } MM_SYSTEMSIZE; 00426 00427 NTKERNELAPI 00428 MM_SYSTEMSIZE 00429 MmQuerySystemSize( 00430 VOID 00431 ); 00432 00433 // end_wdm 00434 00435 NTKERNELAPI 00436 BOOLEAN 00437 MmIsThisAnNtAsSystem( 00438 VOID 00439 ); 00440 00441 // begin_wdm 00442 00443 typedef enum _LOCK_OPERATION { 00444 IoReadAccess, 00445 IoWriteAccess, 00446 IoModifyAccess 00447 } LOCK_OPERATION; 00448 00449 // end_ntddk end_wdm end_nthal end_ntifs 00450 00451 // 00452 // NT product type. 00453 // 00454 00455 extern ULONG MmProductType; 00456 00457 typedef struct _MMINFO_COUNTERS { 00458 ULONG PageFaultCount; 00459 ULONG CopyOnWriteCount; 00460 ULONG TransitionCount; 00461 ULONG CacheTransitionCount; 00462 ULONG DemandZeroCount; 00463 ULONG PageReadCount; 00464 ULONG PageReadIoCount; 00465 ULONG CacheReadCount; 00466 ULONG CacheIoCount; 00467 ULONG DirtyPagesWriteCount; 00468 ULONG DirtyWriteIoCount; 00469 ULONG MappedPagesWriteCount; 00470 ULONG MappedWriteIoCount; 00471 } MMINFO_COUNTERS; 00472 00473 typedef MMINFO_COUNTERS *PMMINFO_COUNTERS; 00474 00475 extern MMINFO_COUNTERS MmInfoCounters; 00476 00477 00478 00479 // 00480 // Memory management initialization routine (for both phases). 00481 // 00482 00483 BOOLEAN 00484 MmInitSystem ( 00485 IN ULONG Phase, 00486 IN PLOADER_PARAMETER_BLOCK LoaderBlock, 00487 IN PPHYSICAL_MEMORY_DESCRIPTOR PhysicalMemoryBlock 00488 ); 00489 00490 VOID 00491 MmInitializeMemoryLimits ( 00492 IN PLOADER_PARAMETER_BLOCK LoaderBlock, 00493 IN PBOOLEAN IncludedType, 00494 OUT PPHYSICAL_MEMORY_DESCRIPTOR Memory 00495 ); 00496 00497 VOID 00498 MmFreeLoaderBlock ( 00499 IN PLOADER_PARAMETER_BLOCK LoaderBlock 00500 ); 00501 00502 VOID 00503 MmEnablePAT ( 00504 VOID 00505 ); 00506 00507 PVOID 00508 MmAllocateIndependentPages( 00509 IN SIZE_T NumberOfBytes 00510 ); 00511 00512 BOOLEAN 00513 MmSetPageProtection( 00514 IN PVOID VirtualAddress, 00515 IN SIZE_T NumberOfBytes, 00516 IN ULONG NewProtect 00517 ); 00518 00519 // 00520 // Shutdown routine - flushes dirty pages, etc for system shutdown. 00521 // 00522 00523 BOOLEAN 00524 MmShutdownSystem ( 00525 VOID 00526 ); 00527 00528 // 00529 // Routines to deal with working set and commit enforcement. 00530 // 00531 00532 LOGICAL 00533 MmAssignProcessToJob( 00534 IN PEPROCESS Process 00535 ); 00536 00537 LOGICAL 00538 MmEnforceWorkingSetLimit( 00539 IN PMMSUPPORT WsInfo, 00540 IN LOGICAL Enable 00541 ); 00542 00543 // 00544 // Routines to deal with session space. 00545 // 00546 00547 NTSTATUS 00548 MmSessionCreate( 00549 OUT PULONG SessionId 00550 ); 00551 00552 NTSTATUS 00553 MmSessionDelete( 00554 IN ULONG SessionId 00555 ); 00556 00557 typedef 00558 NTSTATUS 00559 (*PKWIN32_CALLOUT) ( 00560 IN PVOID Arg 00561 ); 00562 00563 NTSTATUS 00564 MmDispatchWin32Callout( 00565 IN PKWIN32_CALLOUT Function, 00566 IN PKWIN32_CALLOUT WorkerCallback OPTIONAL, 00567 IN PVOID Arg, 00568 IN PULONG SessionId OPTIONAL 00569 ); 00570 00571 VOID 00572 MmSessionLeader( 00573 IN PEPROCESS Process 00574 ); 00575 00576 VOID 00577 MmSessionSetUnloadAddress ( 00578 IN PDRIVER_OBJECT pWin32KDevice 00579 ); 00580 00581 // 00582 // Pool support routines to allocate complete pages, not for 00583 // general consumption, these are only used by the executive pool allocator. 00584 // 00585 00586 LOGICAL 00587 MmResourcesAvailable ( 00588 IN POOL_TYPE PoolType, 00589 IN SIZE_T NumberOfBytes, 00590 IN EX_POOL_PRIORITY Priority 00591 ); 00592 00593 PVOID 00594 MiAllocatePoolPages ( 00595 IN POOL_TYPE PoolType, 00596 IN SIZE_T SizeInBytes, 00597 IN ULONG IsLargeSessionAllocation 00598 ); 00599 00600 ULONG 00601 MiFreePoolPages ( 00602 IN PVOID StartingAddress 00603 ); 00604 00605 PVOID 00606 MiSessionPoolVector( 00607 VOID 00608 ); 00609 00610 VOID 00611 MiSessionPoolAllocated( 00612 IN PVOID VirtualAddress, 00613 IN SIZE_T NumberOfBytes, 00614 IN POOL_TYPE PoolType 00615 ); 00616 00617 VOID 00618 MiSessionPoolFreed( 00619 IN PVOID VirtualAddress, 00620 IN SIZE_T NumberOfBytes, 00621 IN POOL_TYPE PoolType 00622 ); 00623 00624 // 00625 // Routine for determining which pool a given address resides within. 00626 // 00627 00628 POOL_TYPE 00629 MmDeterminePoolType ( 00630 IN PVOID VirtualAddress 00631 ); 00632 00633 LOGICAL 00634 MmIsSystemAddressLocked( 00635 IN PVOID VirtualAddress 00636 ); 00637 00638 // 00639 // First level fault routine. 00640 // 00641 00642 NTSTATUS 00643 MmAccessFault ( 00644 IN BOOLEAN StoreInstruction, 00645 IN PVOID VirtualAddress, 00646 IN KPROCESSOR_MODE PreviousMode, 00647 IN PVOID TrapInformation 00648 ); 00649 00650 // 00651 // Process Support Routines. 00652 // 00653 00654 BOOLEAN 00655 MmCreateProcessAddressSpace ( 00656 IN ULONG MinimumWorkingSetSize, 00657 IN PEPROCESS NewProcess, 00658 OUT PULONG_PTR DirectoryTableBase 00659 ); 00660 00661 NTSTATUS 00662 MmInitializeProcessAddressSpace ( 00663 IN PEPROCESS ProcessToInitialize, 00664 IN PEPROCESS ProcessToClone OPTIONAL, 00665 IN PVOID SectionToMap OPTIONAL, 00666 OUT PUNICODE_STRING * AuditName OPTIONAL 00667 ); 00668 00669 VOID 00670 MmDeleteProcessAddressSpace ( 00671 IN PEPROCESS Process 00672 ); 00673 00674 VOID 00675 MmCleanProcessAddressSpace ( 00676 VOID 00677 ); 00678 00679 VOID 00680 MmCleanUserProcessAddressSpace ( 00681 VOID 00682 ); 00683 00684 VOID 00685 MmCleanVirtualAddressDescriptor ( 00686 VOID 00687 ); 00688 00689 PVOID 00690 MmCreateKernelStack ( 00691 BOOLEAN LargeStack 00692 ); 00693 00694 VOID 00695 MmDeleteKernelStack ( 00696 IN PVOID PointerKernelStack, 00697 IN BOOLEAN LargeStack 00698 ); 00699 00700 NTKERNELAPI 00701 NTSTATUS 00702 MmGrowKernelStack ( 00703 IN PVOID CurrentStack 00704 ); 00705 00706 #if defined(_IA64_) 00707 NTSTATUS 00708 MmGrowKernelBackingStore ( 00709 IN PVOID CurrentStack 00710 ); 00711 #endif // defined(_IA64_) 00712 00713 VOID 00714 MmOutPageKernelStack ( 00715 IN PKTHREAD Thread 00716 ); 00717 00718 VOID 00719 MmInPageKernelStack ( 00720 IN PKTHREAD Thread 00721 ); 00722 00723 VOID 00724 MmOutSwapProcess ( 00725 IN PKPROCESS Process 00726 ); 00727 00728 VOID 00729 MmInSwapProcess ( 00730 IN PKPROCESS Process 00731 ); 00732 00733 PTEB 00734 MmCreateTeb ( 00735 IN PEPROCESS TargetProcess, 00736 IN PINITIAL_TEB InitialTeb, 00737 IN PCLIENT_ID ClientId 00738 ); 00739 00740 PPEB 00741 MmCreatePeb ( 00742 IN PEPROCESS TargetProcess, 00743 IN PINITIAL_PEB InitialPeb 00744 ); 00745 00746 VOID 00747 MmDeleteTeb ( 00748 IN PEPROCESS TargetProcess, 00749 IN PVOID TebBase 00750 ); 00751 00752 VOID 00753 MmAllowWorkingSetExpansion ( 00754 VOID 00755 ); 00756 00757 NTKERNELAPI 00758 NTSTATUS 00759 MmAdjustWorkingSetSize ( 00760 IN SIZE_T WorkingSetMinimum, 00761 IN SIZE_T WorkingSetMaximum, 00762 IN ULONG SystemCache 00763 ); 00764 00765 VOID 00766 MmAdjustPageFileQuota ( 00767 IN ULONG NewPageFileQuota 00768 ); 00769 00770 VOID 00771 MmWorkingSetManager ( 00772 VOID 00773 ); 00774 00775 VOID 00776 MmSetMemoryPriorityProcess( 00777 IN PEPROCESS Process, 00778 IN UCHAR MemoryPriority 00779 ); 00780 00781 // 00782 // Dynamic system loading support 00783 // 00784 00785 NTSTATUS 00786 MmLoadSystemImage ( 00787 IN PUNICODE_STRING ImageFileName, 00788 IN PUNICODE_STRING NamePrefix OPTIONAL, 00789 IN PUNICODE_STRING LoadedBaseName OPTIONAL, 00790 IN BOOLEAN LoadInSessionSpace, 00791 OUT PVOID *Section, 00792 OUT PVOID *ImageBaseAddress 00793 ); 00794 00795 NTSTATUS 00796 MmLoadAndLockSystemImage ( 00797 IN PUNICODE_STRING ImageFileName, 00798 IN PUNICODE_STRING NamePrefix OPTIONAL, 00799 IN PUNICODE_STRING LoadedBaseName OPTIONAL, 00800 OUT PVOID *Section, 00801 OUT PVOID *ImageBaseAddress 00802 ); 00803 00804 VOID 00805 MmFreeDriverInitialization ( 00806 IN PVOID Section 00807 ); 00808 00809 NTSTATUS 00810 MmUnloadSystemImage ( 00811 IN PVOID Section 00812 ); 00813 00814 VOID 00815 MmMakeKernelResourceSectionWritable ( 00816 VOID 00817 ); 00818 00819 VOID 00820 VerifierFreeTrackedPool( 00821 IN PVOID VirtualAddress, 00822 IN SIZE_T ChargedBytes, 00823 IN LOGICAL CheckType, 00824 IN LOGICAL SpecialPool 00825 ); 00826 00827 // 00828 // Triage support 00829 // 00830 00831 ULONG 00832 MmSizeOfTriageInformation( 00833 VOID 00834 ); 00835 00836 ULONG 00837 MmSizeOfUnloadedDriverInformation( 00838 VOID 00839 ); 00840 00841 VOID 00842 MmWriteTriageInformation( 00843 IN PVOID 00844 ); 00845 00846 VOID 00847 MmWriteUnloadedDriverInformation( 00848 IN PVOID 00849 ); 00850 00851 // 00852 // Cache manager support 00853 // 00854 00855 #if defined(_NTDDK_) || defined(_NTIFS_) 00856 00857 // begin_ntifs 00858 00859 NTKERNELAPI 00860 BOOLEAN 00861 MmIsRecursiveIoFault( 00862 VOID 00863 ); 00864 00865 // end_ntifs 00866 #else 00867 00868 //++ 00869 // 00870 // BOOLEAN 00871 // MmIsRecursiveIoFault ( 00872 // VOID 00873 // ); 00874 // 00875 // Routine Description: 00876 // 00877 // 00878 // This macro examines the thread's page fault clustering information 00879 // and determines if the current page fault is occurring during an I/O 00880 // operation. 00881 // 00882 // Arguments: 00883 // 00884 // None. 00885 // 00886 // Return Value: 00887 // 00888 // Returns TRUE if the fault is occurring during an I/O operation, 00889 // FALSE otherwise. 00890 // 00891 //-- 00892 00893 #define MmIsRecursiveIoFault() \ 00894 ((PsGetCurrentThread()->DisablePageFaultClustering) | \ 00895 (PsGetCurrentThread()->ForwardClusterOnly)) 00896 00897 #endif 00898 00899 //++ 00900 // 00901 // VOID 00902 // MmDisablePageFaultClustering 00903 // OUT PULONG SavedState 00904 // ); 00905 // 00906 // Routine Description: 00907 // 00908 // 00909 // This macro disables page fault clustering for the current thread. 00910 // Note, that this indicates that file system I/O is in progress 00911 // for that thread. 00912 // 00913 // Arguments: 00914 // 00915 // SavedState - returns previous state of page fault clustering which 00916 // is guaranteed to be nonzero 00917 // 00918 // Return Value: 00919 // 00920 // None. 00921 // 00922 //-- 00923 00924 #define MmDisablePageFaultClustering(SavedState) { \ 00925 *(SavedState) = 2 + (ULONG)PsGetCurrentThread()->DisablePageFaultClustering;\ 00926 PsGetCurrentThread()->DisablePageFaultClustering = TRUE; } 00927 00928 00929 //++ 00930 // 00931 // VOID 00932 // MmEnablePageFaultClustering 00933 // IN ULONG SavedState 00934 // ); 00935 // 00936 // Routine Description: 00937 // 00938 // 00939 // This macro enables page fault clustering for the current thread. 00940 // Note, that this indicates that no file system I/O is in progress for 00941 // that thread. 00942 // 00943 // Arguments: 00944 // 00945 // SavedState - supplies previous state of page fault clustering 00946 // 00947 // Return Value: 00948 // 00949 // None. 00950 // 00951 //-- 00952 00953 #define MmEnablePageFaultClustering(SavedState) { \ 00954 PsGetCurrentThread()->DisablePageFaultClustering = (BOOLEAN)(SavedState - 2); } 00955 00956 //++ 00957 // 00958 // VOID 00959 // MmSavePageFaultReadAhead 00960 // IN PETHREAD Thread, 00961 // OUT PULONG SavedState 00962 // ); 00963 // 00964 // Routine Description: 00965 // 00966 // 00967 // This macro saves the page fault read ahead value for the specified 00968 // thread. 00969 // 00970 // Arguments: 00971 // 00972 // Thread - Supplies a pointer to the current thread. 00973 // 00974 // SavedState - returns previous state of page fault read ahead 00975 // 00976 // Return Value: 00977 // 00978 // None. 00979 // 00980 //-- 00981 00982 00983 #define MmSavePageFaultReadAhead(Thread,SavedState) { \ 00984 *(SavedState) = (Thread)->ReadClusterSize * 2 + \ 00985 (Thread)->ForwardClusterOnly; } 00986 00987 //++ 00988 // 00989 // VOID 00990 // MmSetPageFaultReadAhead 00991 // IN PETHREAD Thread, 00992 // IN ULONG ReadAhead 00993 // ); 00994 // 00995 // Routine Description: 00996 // 00997 // 00998 // This macro sets the page fault read ahead value for the specified 00999 // thread, and indicates that file system I/O is in progress for that 01000 // thread. 01001 // 01002 // Arguments: 01003 // 01004 // Thread - Supplies a pointer to the current thread. 01005 // 01006 // ReadAhead - Supplies the number of pages to read in addition to 01007 // the page the fault is taken on. A value of 0 01008 // reads only the faulting page, a value of 1 reads in 01009 // the faulting page and the following page, etc. 01010 // 01011 // Return Value: 01012 // 01013 // None. 01014 // 01015 //-- 01016 01017 01018 #define MmSetPageFaultReadAhead(Thread,ReadAhead) { \ 01019 (Thread)->ForwardClusterOnly = TRUE; \ 01020 if ((ReadAhead) > MM_MAXIMUM_READ_CLUSTER_SIZE) { \ 01021 (Thread)->ReadClusterSize = MM_MAXIMUM_READ_CLUSTER_SIZE;\ 01022 } else { \ 01023 (Thread)->ReadClusterSize = (ReadAhead); \ 01024 } } 01025 01026 //++ 01027 // 01028 // VOID 01029 // MmResetPageFaultReadAhead 01030 // IN PETHREAD Thread, 01031 // IN ULONG SavedState 01032 // ); 01033 // 01034 // Routine Description: 01035 // 01036 // 01037 // This macro resets the default page fault read ahead value for the specified 01038 // thread, and indicates that file system I/O is not in progress for that 01039 // thread. 01040 // 01041 // Arguments: 01042 // 01043 // Thread - Supplies a pointer to the current thread. 01044 // 01045 // SavedState - supplies previous state of page fault read ahead 01046 // 01047 // Return Value: 01048 // 01049 // None. 01050 // 01051 //-- 01052 01053 #define MmResetPageFaultReadAhead(Thread, SavedState) { \ 01054 (Thread)->ForwardClusterOnly = (BOOLEAN)((SavedState) & 1); \ 01055 (Thread)->ReadClusterSize = (SavedState) / 2; } 01056 01057 // 01058 // The order of this list is important, the zeroed, free and standby 01059 // must occur before the modified or bad so comparisons can be 01060 // made when pages are added to a list. 01061 // 01062 // NOTE: This field is limited to 8 elements. 01063 // 01064 01065 #define NUMBER_OF_PAGE_LISTS 8 01066 01067 typedef enum _MMLISTS { 01068 ZeroedPageList, 01069 FreePageList, 01070 StandbyPageList, //this list and before make up available pages. 01071 ModifiedPageList, 01072 ModifiedNoWritePageList, 01073 BadPageList, 01074 ActiveAndValid, 01075 TransitionPage 01076 } MMLISTS; 01077 01078 typedef struct _MMPFNLIST { 01079 PFN_NUMBER Total; 01080 MMLISTS ListName; 01081 PFN_NUMBER Flink; 01082 PFN_NUMBER Blink; 01083 } MMPFNLIST; 01084 01085 typedef MMPFNLIST *PMMPFNLIST; 01086 01087 extern MMPFNLIST MmModifiedPageListHead; 01088 01089 extern PFN_NUMBER MmThrottleTop; 01090 extern PFN_NUMBER MmThrottleBottom; 01091 01092 //++ 01093 // 01094 // BOOLEAN 01095 // MmEnoughMemoryForWrite ( 01096 // VOID 01097 // ); 01098 // 01099 // Routine Description: 01100 // 01101 // 01102 // This macro checks the modified pages and available pages to determine 01103 // to allow the cache manager to throttle write operations. 01104 // 01105 // For NTAS: 01106 // Writes are blocked if there are less than 127 available pages OR 01107 // there are more than 1000 modified pages AND less than 450 available pages. 01108 // 01109 // For DeskTop: 01110 // Writes are blocked if there are less than 30 available pages OR 01111 // there are more than 1000 modified pages AND less than 250 available pages. 01112 // 01113 // Arguments: 01114 // 01115 // None. 01116 // 01117 // Return Value: 01118 // 01119 // TRUE if ample memory exists and the write should proceed. 01120 // 01121 //-- 01122 01123 #define MmEnoughMemoryForWrite() \ 01124 ((MmAvailablePages > MmThrottleTop) \ 01125 || \ 01126 (((MmModifiedPageListHead.Total < 1000)) && \ 01127 (MmAvailablePages > MmThrottleBottom))) 01128 01129 01130 NTKERNELAPI 01131 NTSTATUS 01132 MmCreateSection ( 01133 OUT PVOID *SectionObject, 01134 IN ACCESS_MASK DesiredAccess, 01135 IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, 01136 IN PLARGE_INTEGER MaximumSize, 01137 IN ULONG SectionPageProtection, 01138 IN ULONG AllocationAttributes, 01139 IN HANDLE FileHandle OPTIONAL, 01140 IN PFILE_OBJECT File OPTIONAL 01141 ); 01142 01143 01144 NTKERNELAPI 01145 NTSTATUS 01146 MmMapViewOfSection( 01147 IN PVOID SectionToMap, 01148 IN PEPROCESS Process, 01149 IN OUT PVOID *CapturedBase, 01150 IN ULONG_PTR ZeroBits, 01151 IN SIZE_T CommitSize, 01152 IN OUT PLARGE_INTEGER SectionOffset, 01153 IN OUT PSIZE_T CapturedViewSize, 01154 IN SECTION_INHERIT InheritDisposition, 01155 IN ULONG AllocationType, 01156 IN ULONG Protect 01157 ); 01158 01159 NTKERNELAPI 01160 NTSTATUS 01161 MmUnmapViewOfSection( 01162 IN PEPROCESS Process, 01163 IN PVOID BaseAddress 01164 ); 01165 01166 // begin_ntifs 01167 01168 BOOLEAN 01169 MmForceSectionClosed ( 01170 IN PSECTION_OBJECT_POINTERS SectionObjectPointer, 01171 IN BOOLEAN DelayClose 01172 ); 01173 01174 // end_ntifs 01175 01176 NTSTATUS 01177 MmGetFileNameForSection ( 01178 IN HANDLE Section, 01179 OUT PSTRING FileName 01180 ); 01181 01182 NTSTATUS 01183 MmAddVerifierThunks ( 01184 IN PVOID ThunkBuffer, 01185 IN ULONG ThunkBufferSize 01186 ); 01187 01188 NTSTATUS 01189 MmSetVerifierInformation ( 01190 IN OUT PVOID SystemInformation, 01191 IN ULONG SystemInformationLength 01192 ); 01193 01194 NTSTATUS 01195 MmGetVerifierInformation( 01196 OUT PVOID SystemInformation, 01197 IN ULONG SystemInformationLength, 01198 OUT PULONG Length 01199 ); 01200 01201 NTSTATUS 01202 MmGetPageFileInformation( 01203 OUT PVOID SystemInformation, 01204 IN ULONG SystemInformationLength, 01205 OUT PULONG Length 01206 ); 01207 01208 NTSTATUS 01209 MmExtendSection ( 01210 IN PVOID SectionToExtend, 01211 IN OUT PLARGE_INTEGER NewSectionSize, 01212 IN ULONG IgnoreFileSizeChecking 01213 ); 01214 01215 NTSTATUS 01216 MmFlushVirtualMemory ( 01217 IN PEPROCESS Process, 01218 IN OUT PVOID *BaseAddress, 01219 IN OUT PSIZE_T RegionSize, 01220 OUT PIO_STATUS_BLOCK IoStatus 01221 ); 01222 01223 NTSTATUS 01224 MmMapViewInSystemCache ( 01225 IN PVOID SectionToMap, 01226 OUT PVOID *CapturedBase, 01227 IN OUT PLARGE_INTEGER SectionOffset, 01228 IN OUT PULONG CapturedViewSize 01229 ); 01230 01231 VOID 01232 MmUnmapViewInSystemCache ( 01233 IN PVOID BaseAddress, 01234 IN PVOID SectionToUnmap, 01235 IN ULONG AddToFront 01236 ); 01237 01238 BOOLEAN 01239 MmPurgeSection ( 01240 IN PSECTION_OBJECT_POINTERS SectionObjectPointer, 01241 IN PLARGE_INTEGER Offset OPTIONAL, 01242 IN SIZE_T RegionSize, 01243 IN ULONG IgnoreCacheViews 01244 ); 01245 01246 NTSTATUS 01247 MmFlushSection ( 01248 IN PSECTION_OBJECT_POINTERS SectionObjectPointer, 01249 IN PLARGE_INTEGER Offset OPTIONAL, 01250 IN SIZE_T RegionSize, 01251 OUT PIO_STATUS_BLOCK IoStatus, 01252 IN ULONG AcquireFile 01253 ); 01254 01255 NTSTATUS 01256 MmGetCrashDumpInformation ( 01257 IN PSYSTEM_CRASH_DUMP_INFORMATION CrashInfo 01258 ); 01259 01260 NTSTATUS 01261 MmGetCrashDumpStateInformation ( 01262 IN PSYSTEM_CRASH_STATE_INFORMATION CrashInfo 01263 ); 01264 01265 // begin_ntifs 01266 01267 typedef enum _MMFLUSH_TYPE { 01268 MmFlushForDelete, 01269 MmFlushForWrite 01270 } MMFLUSH_TYPE; 01271 01272 01273 BOOLEAN 01274 MmFlushImageSection ( 01275 IN PSECTION_OBJECT_POINTERS SectionObjectPointer, 01276 IN MMFLUSH_TYPE FlushType 01277 ); 01278 01279 BOOLEAN 01280 MmCanFileBeTruncated ( 01281 IN PSECTION_OBJECT_POINTERS SectionPointer, 01282 IN PLARGE_INTEGER NewFileSize 01283 ); 01284 01285 01286 // end_ntifs 01287 01288 BOOLEAN 01289 MmDisableModifiedWriteOfSection ( 01290 IN PSECTION_OBJECT_POINTERS SectionObjectPointer 01291 ); 01292 01293 VOID 01294 MmPurgeWorkingSet ( 01295 IN PEPROCESS Process, 01296 IN PVOID BaseAddress, 01297 IN SIZE_T RegionSize 01298 ); 01299 01300 BOOLEAN // ntifs 01301 MmSetAddressRangeModified ( // ntifs 01302 IN PVOID Address, // ntifs 01303 IN SIZE_T Length // ntifs 01304 ); // ntifs 01305 01306 BOOLEAN 01307 MmCheckCachedPageState ( 01308 IN PVOID Address, 01309 IN BOOLEAN SetToZero 01310 ); 01311 01312 NTSTATUS 01313 MmCopyToCachedPage ( 01314 IN PVOID Address, 01315 IN PVOID UserBuffer, 01316 IN ULONG Offset, 01317 IN SIZE_T CountInBytes, 01318 IN BOOLEAN DontZero 01319 ); 01320 01321 VOID 01322 MmUnlockCachedPage ( 01323 IN PVOID AddressInCache 01324 ); 01325 01326 PVOID 01327 MmDbgReadCheck ( 01328 IN PVOID VirtualAddress 01329 ); 01330 01331 PVOID 01332 MmDbgWriteCheck ( 01333 IN PVOID VirtualAddress, 01334 IN PHARDWARE_PTE Opaque 01335 ); 01336 01337 VOID 01338 MmDbgReleaseAddress ( 01339 IN PVOID VirtualAddress, 01340 IN PHARDWARE_PTE Opaque 01341 ); 01342 01343 PVOID64 01344 MmDbgReadCheck64 ( 01345 IN PVOID64 VirtualAddress 01346 ); 01347 01348 PVOID64 01349 MmDbgWriteCheck64 ( 01350 IN PVOID64 VirtualAddress 01351 ); 01352 01353 PVOID64 01354 MmDbgTranslatePhysicalAddress64 ( 01355 IN PHYSICAL_ADDRESS PhysicalAddress 01356 ); 01357 01358 VOID 01359 MmHibernateInformation ( 01360 IN PVOID MemoryMap, 01361 OUT PULONG_PTR HiberVa, 01362 OUT PPHYSICAL_ADDRESS HiberPte 01363 ); 01364 01365 // begin_ntddk begin_ntifs begin_wdm 01366 01367 NTKERNELAPI 01368 VOID 01369 MmProbeAndLockProcessPages ( 01370 IN OUT PMDL MemoryDescriptorList, 01371 IN PEPROCESS Process, 01372 IN KPROCESSOR_MODE AccessMode, 01373 IN LOCK_OPERATION Operation 01374 ); 01375 01376 01377 // begin_nthal 01378 // 01379 // I/O support routines. 01380 // 01381 01382 NTKERNELAPI 01383 VOID 01384 MmProbeAndLockPages ( 01385 IN OUT PMDL MemoryDescriptorList, 01386 IN KPROCESSOR_MODE AccessMode, 01387 IN LOCK_OPERATION Operation 01388 ); 01389 01390 01391 NTKERNELAPI 01392 VOID 01393 MmUnlockPages ( 01394 IN PMDL MemoryDescriptorList 01395 ); 01396 01397 NTKERNELAPI 01398 VOID 01399 MmBuildMdlForNonPagedPool ( 01400 IN OUT PMDL MemoryDescriptorList 01401 ); 01402 01403 NTKERNELAPI 01404 PVOID 01405 MmMapLockedPages ( 01406 IN PMDL MemoryDescriptorList, 01407 IN KPROCESSOR_MODE AccessMode 01408 ); 01409 01410 NTKERNELAPI 01411 PVOID 01412 MmGetSystemRoutineAddress ( 01413 IN PUNICODE_STRING SystemRoutineName 01414 ); 01415 01416 // end_wdm 01417 01418 NTKERNELAPI 01419 NTSTATUS 01420 MmMapUserAddressesToPage ( 01421 IN PVOID BaseAddress, 01422 IN SIZE_T NumberOfBytes, 01423 IN PVOID PageAddress 01424 ); 01425 01426 // begin_wdm 01427 01428 // 01429 // _MM_PAGE_PRIORITY_ provides a method for the system to handle requests 01430 // intelligently in low resource conditions. 01431 // 01432 // LowPagePriority should be used when it is acceptable to the driver for the 01433 // mapping request to fail if the system is low on resources. An example of 01434 // this could be for a non-critical network connection where the driver can 01435 // handle the failure case when system resources are close to being depleted. 01436 // 01437 // NormalPagePriority should be used when it is acceptable to the driver for the 01438 // mapping request to fail if the system is very low on resources. An example 01439 // of this could be for a non-critical local filesystem request. 01440 // 01441 // HighPagePriority should be used when it is unacceptable to the driver for the 01442 // mapping request to fail unless the system is completely out of resources. 01443 // An example of this would be the paging file path in a driver. 01444 // 01445 01446 typedef enum _MM_PAGE_PRIORITY { 01447 LowPagePriority, 01448 NormalPagePriority = 16, 01449 HighPagePriority = 32 01450 } MM_PAGE_PRIORITY; 01451 01452 // 01453 // Note: This function is not available in WDM 1.0 01454 // 01455 NTKERNELAPI 01456 PVOID 01457 MmMapLockedPagesSpecifyCache ( 01458 IN PMDL MemoryDescriptorList, 01459 IN KPROCESSOR_MODE AccessMode, 01460 IN MEMORY_CACHING_TYPE CacheType, 01461 IN PVOID BaseAddress, 01462 IN ULONG BugCheckOnFailure, 01463 IN MM_PAGE_PRIORITY Priority 01464 ); 01465 01466 NTKERNELAPI 01467 VOID 01468 MmUnmapLockedPages ( 01469 IN PVOID BaseAddress, 01470 IN PMDL MemoryDescriptorList 01471 ); 01472 01473 // end_wdm 01474 01475 typedef struct _PHYSICAL_MEMORY_RANGE { 01476 PHYSICAL_ADDRESS BaseAddress; 01477 LARGE_INTEGER NumberOfBytes; 01478 } PHYSICAL_MEMORY_RANGE, *PPHYSICAL_MEMORY_RANGE; 01479 01480 NTKERNELAPI 01481 NTSTATUS 01482 MmAddPhysicalMemory ( 01483 IN PPHYSICAL_ADDRESS StartAddress, 01484 IN OUT PLARGE_INTEGER NumberOfBytes 01485 ); 01486 01487 NTKERNELAPI 01488 NTSTATUS 01489 MmRemovePhysicalMemory ( 01490 IN PPHYSICAL_ADDRESS StartAddress, 01491 IN OUT PLARGE_INTEGER NumberOfBytes 01492 ); 01493 01494 NTKERNELAPI 01495 PPHYSICAL_MEMORY_RANGE 01496 MmGetPhysicalMemoryRanges ( 01497 VOID 01498 ); 01499 01500 NTKERNELAPI 01501 PMDL 01502 MmAllocatePagesForMdl ( 01503 IN PHYSICAL_ADDRESS LowAddress, 01504 IN PHYSICAL_ADDRESS HighAddress, 01505 IN PHYSICAL_ADDRESS SkipBytes, 01506 IN SIZE_T TotalBytes 01507 ); 01508 01509 NTKERNELAPI 01510 VOID 01511 MmFreePagesFromMdl ( 01512 IN PMDL MemoryDescriptorList 01513 ); 01514 01515 // begin_wdm 01516 01517 NTKERNELAPI 01518 PVOID 01519 MmMapIoSpace ( 01520 IN PHYSICAL_ADDRESS PhysicalAddress, 01521 IN SIZE_T NumberOfBytes, 01522 IN MEMORY_CACHING_TYPE CacheType 01523 ); 01524 01525 NTKERNELAPI 01526 VOID 01527 MmUnmapIoSpace ( 01528 IN PVOID BaseAddress, 01529 IN SIZE_T NumberOfBytes 01530 ); 01531 01532 // end_wdm end_ntddk end_ntifs 01533 01534 NTKERNELAPI 01535 VOID 01536 MmProbeAndLockSelectedPages ( 01537 IN OUT PMDL MemoryDescriptorList, 01538 IN PFILE_SEGMENT_ELEMENT SegmentArray, 01539 IN KPROCESSOR_MODE AccessMode, 01540 IN LOCK_OPERATION Operation 01541 ); 01542 01543 // begin_ntddk begin_ntifs 01544 01545 NTKERNELAPI 01546 PVOID 01547 MmMapVideoDisplay ( 01548 IN PHYSICAL_ADDRESS PhysicalAddress, 01549 IN SIZE_T NumberOfBytes, 01550 IN MEMORY_CACHING_TYPE CacheType 01551 ); 01552 01553 NTKERNELAPI 01554 VOID 01555 MmUnmapVideoDisplay ( 01556 IN PVOID BaseAddress, 01557 IN SIZE_T NumberOfBytes 01558 ); 01559 01560 NTKERNELAPI 01561 PHYSICAL_ADDRESS 01562 MmGetPhysicalAddress ( 01563 IN PVOID BaseAddress 01564 ); 01565 01566 NTKERNELAPI 01567 PVOID 01568 MmGetVirtualForPhysical ( 01569 IN PHYSICAL_ADDRESS PhysicalAddress 01570 ); 01571 01572 NTKERNELAPI 01573 PVOID 01574 MmAllocateContiguousMemory ( 01575 IN SIZE_T NumberOfBytes, 01576 IN PHYSICAL_ADDRESS HighestAcceptableAddress 01577 ); 01578 01579 NTKERNELAPI 01580 PVOID 01581 MmAllocateContiguousMemorySpecifyCache ( 01582 IN SIZE_T NumberOfBytes, 01583 IN PHYSICAL_ADDRESS LowestAcceptableAddress, 01584 IN PHYSICAL_ADDRESS HighestAcceptableAddress, 01585 IN PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL, 01586 IN MEMORY_CACHING_TYPE CacheType 01587 ); 01588 01589 NTKERNELAPI 01590 VOID 01591 MmFreeContiguousMemory ( 01592 IN PVOID BaseAddress 01593 ); 01594 01595 NTKERNELAPI 01596 VOID 01597 MmFreeContiguousMemorySpecifyCache ( 01598 IN PVOID BaseAddress, 01599 IN SIZE_T NumberOfBytes, 01600 IN MEMORY_CACHING_TYPE CacheType 01601 ); 01602 01603 // end_ntddk end_ntifs end_nthal 01604 01605 NTKERNELAPI 01606 ULONG 01607 MmGatherMemoryForHibernate ( 01608 IN PMDL Mdl, 01609 IN BOOLEAN Wait 01610 ); 01611 01612 NTKERNELAPI 01613 VOID 01614 MmReturnMemoryForHibernate ( 01615 IN PMDL Mdl 01616 ); 01617 01618 VOID 01619 MmReleaseDumpAddresses ( 01620 IN PFN_NUMBER Pages 01621 ); 01622 01623 // begin_ntddk begin_ntifs begin_nthal 01624 01625 NTKERNELAPI 01626 PVOID 01627 MmAllocateNonCachedMemory ( 01628 IN SIZE_T NumberOfBytes 01629 ); 01630 01631 NTKERNELAPI 01632 VOID 01633 MmFreeNonCachedMemory ( 01634 IN PVOID BaseAddress, 01635 IN SIZE_T NumberOfBytes 01636 ); 01637 01638 NTKERNELAPI 01639 BOOLEAN 01640 MmIsAddressValid ( 01641 IN PVOID VirtualAddress 01642 ); 01643 01644 NTKERNELAPI 01645 BOOLEAN 01646 MmIsNonPagedSystemAddressValid ( 01647 IN PVOID VirtualAddress 01648 ); 01649 01650 // begin_wdm 01651 01652 NTKERNELAPI 01653 SIZE_T 01654 MmSizeOfMdl( 01655 IN PVOID Base, 01656 IN SIZE_T Length 01657 ); 01658 01659 NTKERNELAPI 01660 PMDL 01661 MmCreateMdl( 01662 IN PMDL MemoryDescriptorList OPTIONAL, 01663 IN PVOID Base, 01664 IN SIZE_T Length 01665 ); 01666 01667 NTKERNELAPI 01668 PVOID 01669 MmLockPagableDataSection( 01670 IN PVOID AddressWithinSection 01671 ); 01672 01673 // end_wdm 01674 01675 NTKERNELAPI 01676 VOID 01677 MmLockPagableSectionByHandle ( 01678 IN PVOID ImageSectionHandle 01679 ); 01680 01681 // end_ntddk end_ntifs 01682 NTKERNELAPI 01683 VOID 01684 MmLockPagedPool ( 01685 IN PVOID Address, 01686 IN SIZE_T Size 01687 ); 01688 01689 NTKERNELAPI 01690 VOID 01691 MmUnlockPagedPool ( 01692 IN PVOID Address, 01693 IN SIZE_T Size 01694 ); 01695 01696 // begin_wdm begin_ntddk begin_ntifs 01697 NTKERNELAPI 01698 VOID 01699 MmResetDriverPaging ( 01700 IN PVOID AddressWithinSection 01701 ); 01702 01703 01704 NTKERNELAPI 01705 PVOID 01706 MmPageEntireDriver ( 01707 IN PVOID AddressWithinSection 01708 ); 01709 01710 NTKERNELAPI 01711 VOID 01712 MmUnlockPagableImageSection( 01713 IN PVOID ImageSectionHandle 01714 ); 01715 01716 // end_wdm 01717 01718 NTKERNELAPI 01719 HANDLE 01720 MmSecureVirtualMemory ( 01721 IN PVOID Address, 01722 IN SIZE_T Size, 01723 IN ULONG ProbeMode 01724 ); 01725 01726 NTKERNELAPI 01727 VOID 01728 MmUnsecureVirtualMemory ( 01729 IN HANDLE SecureHandle 01730 ); 01731 01732 NTKERNELAPI 01733 NTSTATUS 01734 MmMapViewInSystemSpace ( 01735 IN PVOID Section, 01736 OUT PVOID *MappedBase, 01737 IN PSIZE_T ViewSize 01738 ); 01739 01740 NTKERNELAPI 01741 NTSTATUS 01742 MmUnmapViewInSystemSpace ( 01743 IN PVOID MappedBase 01744 ); 01745 01746 NTKERNELAPI 01747 NTSTATUS 01748 MmMapViewInSessionSpace ( 01749 IN PVOID Section, 01750 OUT PVOID *MappedBase, 01751 IN OUT PSIZE_T ViewSize 01752 ); 01753 01754 NTKERNELAPI 01755 NTSTATUS 01756 MmUnmapViewInSessionSpace ( 01757 IN PVOID MappedBase 01758 ); 01759 01760 // begin_wdm 01761 01762 //++ 01763 // 01764 // VOID 01765 // MmInitializeMdl ( 01766 // IN PMDL MemoryDescriptorList, 01767 // IN PVOID BaseVa, 01768 // IN SIZE_T Length 01769 // ) 01770 // 01771 // Routine Description: 01772 // 01773 // This routine initializes the header of a Memory Descriptor List (MDL). 01774 // 01775 // Arguments: 01776 // 01777 // MemoryDescriptorList - Pointer to the MDL to initialize. 01778 // 01779 // BaseVa - Base virtual address mapped by the MDL. 01780 // 01781 // Length - Length, in bytes, of the buffer mapped by the MDL. 01782 // 01783 // Return Value: 01784 // 01785 // None. 01786 // 01787 //-- 01788 01789 #define MmInitializeMdl(MemoryDescriptorList, BaseVa, Length) { \ 01790 (MemoryDescriptorList)->Next = (PMDL) NULL; \ 01791 (MemoryDescriptorList)->Size = (CSHORT)(sizeof(MDL) + \ 01792 (sizeof(PFN_NUMBER) * ADDRESS_AND_SIZE_TO_SPAN_PAGES((BaseVa), (Length)))); \ 01793 (MemoryDescriptorList)->MdlFlags = 0; \ 01794 (MemoryDescriptorList)->StartVa = (PVOID) PAGE_ALIGN((BaseVa)); \ 01795 (MemoryDescriptorList)->ByteOffset = BYTE_OFFSET((BaseVa)); \ 01796 (MemoryDescriptorList)->ByteCount = (ULONG)(Length); \ 01797 } 01798 01799 //++ 01800 // 01801 // PVOID 01802 // MmGetSystemAddressForMdlSafe ( 01803 // IN PMDL MDL, 01804 // IN MM_PAGE_PRIORITY PRIORITY 01805 // ) 01806 // 01807 // Routine Description: 01808 // 01809 // This routine returns the mapped address of an MDL. If the 01810 // Mdl is not already mapped or a system address, it is mapped. 01811 // 01812 // Arguments: 01813 // 01814 // MemoryDescriptorList - Pointer to the MDL to map. 01815 // 01816 // Priority - Supplies an indication as to how important it is that this 01817 // request succeed under low available PTE conditions. 01818 // 01819 // Return Value: 01820 // 01821 // Returns the base address where the pages are mapped. The base address 01822 // has the same offset as the virtual address in the MDL. 01823 // 01824 // Unlike MmGetSystemAddressForMdl, Safe guarantees that it will always 01825 // return NULL on failure instead of bugchecking the system. 01826 // 01827 // This macro is not usable by WDM 1.0 drivers as 1.0 did not include 01828 // MmMapLockedPagesSpecifyCache. The solution for WDM 1.0 drivers is to 01829 // provide synchronization and set/reset the MDL_MAPPING_CAN_FAIL bit. 01830 // 01831 //-- 01832 01833 #define MmGetSystemAddressForMdlSafe(MDL, PRIORITY) \ 01834 (((MDL)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA | \ 01835 MDL_SOURCE_IS_NONPAGED_POOL)) ? \ 01836 ((MDL)->MappedSystemVa) : \ 01837 (MmMapLockedPagesSpecifyCache((MDL), \ 01838 KernelMode, \ 01839 MmCached, \ 01840 NULL, \ 01841 FALSE, \ 01842 (PRIORITY)))) 01843 01844 //++ 01845 // 01846 // PVOID 01847 // MmGetSystemAddressForMdl ( 01848 // IN PMDL MDL 01849 // ) 01850 // 01851 // Routine Description: 01852 // 01853 // This routine returns the mapped address of an MDL, if the 01854 // Mdl is not already mapped or a system address, it is mapped. 01855 // 01856 // Arguments: 01857 // 01858 // MemoryDescriptorList - Pointer to the MDL to map. 01859 // 01860 // Return Value: 01861 // 01862 // Returns the base address where the pages are mapped. The base address 01863 // has the same offset as the virtual address in the MDL. 01864 // 01865 //-- 01866 01867 //#define MmGetSystemAddressForMdl(MDL) 01868 // (((MDL)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA)) ? 01869 // ((MDL)->MappedSystemVa) : 01870 // ((((MDL)->MdlFlags & (MDL_SOURCE_IS_NONPAGED_POOL)) ? 01871 // ((PVOID)((ULONG)(MDL)->StartVa | (MDL)->ByteOffset)) : 01872 // (MmMapLockedPages((MDL),KernelMode))))) 01873 01874 #define MmGetSystemAddressForMdl(MDL) \ 01875 (((MDL)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA | \ 01876 MDL_SOURCE_IS_NONPAGED_POOL)) ? \ 01877 ((MDL)->MappedSystemVa) : \ 01878 (MmMapLockedPages((MDL),KernelMode))) 01879 01880 //++ 01881 // 01882 // VOID 01883 // MmPrepareMdlForReuse ( 01884 // IN PMDL MDL 01885 // ) 01886 // 01887 // Routine Description: 01888 // 01889 // This routine will take all of the steps necessary to allow an MDL to be 01890 // re-used. 01891 // 01892 // Arguments: 01893 // 01894 // MemoryDescriptorList - Pointer to the MDL that will be re-used. 01895 // 01896 // Return Value: 01897 // 01898 // None. 01899 // 01900 //-- 01901 01902 #define MmPrepareMdlForReuse(MDL) \ 01903 if (((MDL)->MdlFlags & MDL_PARTIAL_HAS_BEEN_MAPPED) != 0) { \ 01904 ASSERT(((MDL)->MdlFlags & MDL_PARTIAL) != 0); \ 01905 MmUnmapLockedPages( (MDL)->MappedSystemVa, (MDL) ); \ 01906 } else if (((MDL)->MdlFlags & MDL_PARTIAL) == 0) { \ 01907 ASSERT(((MDL)->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA) == 0); \ 01908 } 01909 01910 typedef NTSTATUS (*PMM_DLL_INITIALIZE)( 01911 IN PUNICODE_STRING RegistryPath 01912 ); 01913 01914 typedef NTSTATUS (*PMM_DLL_UNLOAD)( 01915 VOID 01916 ); 01917 01918 01919 // end_ntddk end_wdm end_nthal end_ntifs 01920 01921 #if DBG || (i386 && !FPO) 01922 typedef NTSTATUS (*PMM_SNAPSHOT_POOL_PAGE)( 01923 IN PVOID Address, 01924 IN ULONG Size, 01925 IN PSYSTEM_POOL_INFORMATION PoolInformation, 01926 IN PSYSTEM_POOL_ENTRY *PoolEntryInfo, 01927 IN ULONG Length, 01928 IN OUT PULONG RequiredLength 01929 ); 01930 01931 NTSTATUS 01932 MmSnapShotPool( 01933 IN POOL_TYPE PoolType, 01934 IN PMM_SNAPSHOT_POOL_PAGE SnapShotPoolPage, 01935 IN PSYSTEM_POOL_INFORMATION PoolInformation, 01936 IN ULONG Length, 01937 IN OUT PULONG RequiredLength 01938 ); 01939 #endif // DBG || (i386 && !FPO) 01940 01941 PVOID 01942 MmAllocateSpecialPool ( 01943 IN SIZE_T NumberOfBytes, 01944 IN ULONG Tag, 01945 IN POOL_TYPE Type, 01946 IN ULONG SpecialPoolType 01947 ); 01948 01949 VOID 01950 MmFreeSpecialPool ( 01951 IN PVOID P 01952 ); 01953 01954 LOGICAL 01955 MmSetSpecialPool ( 01956 IN LOGICAL Enable 01957 ); 01958 01959 LOGICAL 01960 MmProtectSpecialPool ( 01961 IN PVOID VirtualAddress, 01962 IN ULONG NewProtect 01963 ); 01964 01965 LOGICAL 01966 MmIsSpecialPoolAddressFree ( 01967 IN PVOID VirtualAddress 01968 ); 01969 01970 SIZE_T 01971 MmQuerySpecialPoolBlockSize ( 01972 IN PVOID P 01973 ); 01974 01975 extern ULONG MmSpecialPoolTag; 01976 extern PVOID MmSpecialPoolStart; 01977 extern PVOID MmSpecialPoolEnd; 01978 01979 LOGICAL 01980 MmIsHydraAddress ( 01981 IN PVOID VirtualAddress 01982 ); 01983 01984 PUNICODE_STRING 01985 MmLocateUnloadedDriver ( 01986 IN PVOID VirtualAddress 01987 ); 01988 01989 // begin_ntddk 01990 01991 // 01992 // Define an empty typedef for the _DRIVER_OBJECT structure so it may be 01993 // referenced by function types before it is actually defined. 01994 // 01995 struct _DRIVER_OBJECT; 01996 01997 NTKERNELAPI 01998 LOGICAL 01999 MmIsDriverVerifying ( 02000 IN struct _DRIVER_OBJECT *DriverObject 02001 ); 02002 02003 // end_ntddk 02004 02005 LOGICAL 02006 MmTrimAllSystemPagableMemory ( 02007 IN LOGICAL PurgeTransition 02008 ); 02009 02010 #define MMNONPAGED_QUOTA_INCREASE (64*1024) 02011 02012 #define MMPAGED_QUOTA_INCREASE (512*1024) 02013 02014 #define MMNONPAGED_QUOTA_CHECK (256*1024) 02015 02016 #define MMPAGED_QUOTA_CHECK (4*1024*1024) 02017 02018 BOOLEAN 02019 MmRaisePoolQuota( 02020 IN POOL_TYPE PoolType, 02021 IN SIZE_T OldQuotaLimit, 02022 OUT PSIZE_T NewQuotaLimit 02023 ); 02024 02025 VOID 02026 MmReturnPoolQuota( 02027 IN POOL_TYPE PoolType, 02028 IN SIZE_T ReturnedQuota 02029 ); 02030 02031 // 02032 // Zero page thread routine. 02033 // 02034 02035 VOID 02036 MmZeroPageThread ( 02037 VOID 02038 ); 02039 02040 NTSTATUS 02041 MmCopyVirtualMemory( 02042 IN PEPROCESS FromProcess, 02043 IN PVOID FromAddress, 02044 IN PEPROCESS ToProcess, 02045 OUT PVOID ToAddress, 02046 IN ULONG BufferSize, 02047 IN KPROCESSOR_MODE PreviousMode, 02048 OUT PULONG NumberOfBytesCopied 02049 ); 02050 02051 NTSTATUS 02052 MmGetSectionRange( 02053 IN PVOID AddressWithinSection, 02054 OUT PVOID *StartingSectionAddress, 02055 OUT PULONG SizeofSection 02056 ); 02057 02058 VOID 02059 MmMapMemoryDumpMdl( 02060 IN OUT PMDL MemoryDumpMdl 02061 ); 02062 02063 02064 // begin_ntminiport 02065 02066 // 02067 // Graphics support routines. 02068 // 02069 02070 typedef 02071 VOID 02072 (*PBANKED_SECTION_ROUTINE) ( 02073 IN ULONG ReadBank, 02074 IN ULONG WriteBank, 02075 IN PVOID Context 02076 ); 02077 02078 // end_ntminiport 02079 02080 NTSTATUS 02081 MmSetBankedSection( 02082 IN HANDLE ProcessHandle, 02083 IN PVOID VirtualAddress, 02084 IN ULONG BankLength, 02085 IN BOOLEAN ReadWriteBank, 02086 IN PBANKED_SECTION_ROUTINE BankRoutine, 02087 IN PVOID Context); 02088 02089 02090 NTKERNELAPI 02091 BOOLEAN 02092 MmIsSystemAddressAccessable ( 02093 IN PVOID VirtualAddress 02094 ); 02095 02096 BOOLEAN 02097 MmVerifyImageIsOkForMpUse( 02098 IN PVOID BaseAddress 02099 ); 02100 02101 NTSTATUS 02102 MmMemoryUsage ( 02103 IN PVOID Buffer, 02104 IN ULONG Size, 02105 IN ULONG Type, 02106 OUT PULONG Length 02107 ); 02108 02109 typedef 02110 VOID 02111 (FASTCALL *PPAGE_FAULT_NOTIFY_ROUTINE)( 02112 IN NTSTATUS Status, 02113 IN PVOID VirtualAddress, 02114 IN PVOID TrapInformation 02115 ); 02116 02117 typedef 02118 VOID 02119 (FASTCALL *PHARD_FAULT_NOTIFY_ROUTINE)( 02120 IN HANDLE FileObject, 02121 IN PVOID VirtualAddress 02122 ); 02123 02124 NTKERNELAPI 02125 VOID 02126 FASTCALL 02127 MmSetPageFaultNotifyRoutine( 02128 IN PPAGE_FAULT_NOTIFY_ROUTINE NotifyRoutine 02129 ); 02130 02131 NTKERNELAPI 02132 VOID 02133 FASTCALL 02134 MmSetHardFaultNotifyRoutine( 02135 IN PHARD_FAULT_NOTIFY_ROUTINE NotifyRoutine 02136 ); 02137 02138 NTSTATUS 02139 MmCallDllInitialize( 02140 IN PLDR_DATA_TABLE_ENTRY DataTableEntry 02141 ); 02142 02143 // Crash dump only 02144 // Called to initialize the kernel memory to include in a summary dump 02145 VOID 02146 MmSetKernelDumpRange( 02147 IN PVOID DumpContext 02148 ); 02149 02150 #ifdef NTPERF 02151 #include "perfinfokrn.h" 02152 #else 02153 #define PERFINFO_ADDPOOLPAGE(CheckType, PoolIndex, Addr, PoolDesc) 02154 #define PERFINFO_ADDTOWS(PageFrame, Address, Pid) 02155 #define PERFINFO_BIGPOOLALLOC(Type, PTag, NumBytes, Addr) 02156 #define PERFINFO_CM_CHECKCELLTYPE(Map) 02157 #define PERFINFO_CM_CHECKCELLTYPE(Map) 02158 #define PERFINFO_CM_HIVECELL_REFERENCE_FLAT(Hive, pcell, Cell) 02159 #define PERFINFO_CM_HIVECELL_REFERENCE_PAGED(Hive, pcell, Cell, Type, Map) 02160 #define PERFINFO_CONVERT_TO_GUI_THREAD(EThread) 02161 #define PERFINFO_DECREFCNT(PageFrame, Flag, Type) 02162 #define PERFINFO_DELETE_STACK(PointerPte, NumberOfPtes) 02163 #define PERFINFO_DISPATCHFAULT_DECL() 02164 #define PERFINFO_DRIVER_COMPLETIONROUTINE_CALL(irp, irpsp) 02165 #define PERFINFO_DRIVER_COMPLETIONROUTINE_RETURN(irp, irpsp) 02166 #define PERFINFO_DRIVER_INIT(pdo) 02167 #define PERFINFO_DRIVER_INIT_COMPLETE(pdo) 02168 #define PERFINFO_DRIVER_MAJORFUNCTION_CALL(irp, irpsp, pdo) 02169 #define PERFINFO_DRIVER_MAJORFUNCTION_RETURN(irp, irpsp, pdo) 02170 #define PERFINFO_EXALLOCATEPOOLWITHTAG_DECL() 02171 #define PERFINFO_EXFREEPOOLWITHTAG_DECL() 02172 #define PERFINFO_FREEPOOL(Addr) 02173 #define PERFINFO_FREEPOOLPAGE(CheckType, PoolIndex, Addr, PoolDesc) 02174 #define PERFINFO_GET_PAGE_INFO(PointerPte) 02175 #define PERFINFO_GET_PAGE_INFO_REPLACEMENT(PointerPte) 02176 #define PERFINFO_GET_PAGE_INFO_WITH_DECL(PointerPte) 02177 #define PERFINFO_GROW_STACK(EThread) 02178 #define PERFINFO_HARDFAULT(Address, InpageSupport) 02179 #define PERFINFO_HARDFAULT_INFO(ProtoPte) 02180 #define PERFINFO_HARDFAULT_IOTIME() 02181 #define PERFINFO_HIVECELL_REFERENCE_FLAT(Hive, pcell, Cell) 02182 #define PERFINFO_HIVECELL_REFERENCE_PAGED(Hive, pcell, Cell, Type, Map) 02183 #define PERFINFO_IMAGE_LOAD(LdrDataTableEntry) 02184 #define PERFINFO_IMAGE_UNLOAD(Address) 02185 #define PERFINFO_INIT_POOLRANGE(PoolStart, PoolPages) 02186 #define PERFINFO_INIT_PERFMEMTABLE(LoaderBlock) 02187 #define PERFINFO_INIT_TRACEFLAGS(OptionString, SpecificOption) 02188 #define PERFINFO_INSERTINLIST(Page, ListHead) 02189 #define PERFINFO_INSERT_FRONT_STANDBY(Page) 02190 #define PERFINFO_LOG_MARK(PMARK) 02191 #define PERFINFO_LOG_MARK_SPRINTF(PMARK, VARIABLE) 02192 #define PERFINFO_LOG_WMI_TRACE_EVENT( PData, xLength) 02193 #define PERFINFO_LOG_WMI_TRACE_KERNEL_EVENT(GroupType, PData, xLength, Thread) 02194 #define PERFINFO_LOG_WMI_TRACE_LONG_EVENT(GroupType, PData, xCount, Thread) 02195 #define PERFINFO_LOG_WS_REMOVAL(Type, WsInfo) 02196 #define PERFINFO_LOG_WS_REPLACEMENT(WsInfo) 02197 #define PERFINFO_MIH_DECL 02198 #define PERFINFO_MMINIT_DECL 02199 #define PERFINFO_MMINIT_START() 02200 #define PERFINFO_MOD_PAGE_WRITER3() 02201 #define PERFINFO_PAGE_INFO_DECL() 02202 #define PERFINFO_PAGE_INFO_REPLACEMENT_DECL() 02203 #define PERFINFO_POOLALLOC(Type, PTag, NumBytes) 02204 #define PERFINFO_POOLALLOC_ADDR(Addr) 02205 #define PERFINFO_POOL_ALLOC_COMMON(Type, PTag, NumBytes) 02206 #define PERFINFO_PRIVATE_COPY_ON_WRITE(CopyFrom, PAGE_SIZE) 02207 #define PERFINFO_PRIVATE_PAGE_DEMAND_ZERO(VirtualAddress) 02208 #define PERFINFO_PROCESS_CREATE(EProcess) 02209 #define PERFINFO_PROCESS_DELETE(EProcess) 02210 #define PERFINFO_DELETE_PAGE(ppfn) 02211 #define PERFINFO_REMOVEPAGE(PageIndex, LogType) 02212 #define PERFINFO_SECTION_CREATE(ControlArea) 02213 #define PERFINFO_SEGMENT_DELETE(FileName) 02214 #define PERFINFO_SOFTFAULT(PageFrame, Address, Type) 02215 #define PERFINFO_THREAD_CREATE(EThread, ITeb) 02216 #define PERFINFO_THREAD_DELETE(EThread) 02217 #define PERFINFO_UNLINKFREEPAGE(Index, Location) 02218 #define PERFINFO_UNLINKPAGE(Index, Location) 02219 #define PERFINFO_WSMANAGE_ACTUALTRIM(Trim) 02220 #define PERFINFO_WSMANAGE_DECL() 02221 #define PERFINFO_WSMANAGE_DUMPENTRIES() 02222 #define PERFINFO_WSMANAGE_DUMPENTRIES_CLAIMS() 02223 #define PERFINFO_WSMANAGE_DUMPENTRIES_FAULTS() 02224 #define PERFINFO_WSMANAGE_DUMPWS(VmSupport, SampledAgeCounts) 02225 #define PERFINFO_WSMANAGE_FINALACTION(TrimAction) 02226 #define PERFINFO_WSMANAGE_GLOBAL_DECL 02227 #define PERFINFO_WSMANAGE_LOGINFO_CLAIMS(TrimAction) 02228 #define PERFINFO_WSMANAGE_LOGINFO_FAULTS(TrimAction) 02229 #define PERFINFO_WSMANAGE_PROCESS_RESET(VmSupport) 02230 #define PERFINFO_WSMANAGE_PROCESS_RESET(VmSupport) 02231 #define PERFINFO_WSMANAGE_STARTLOG() 02232 #define PERFINFO_WSMANAGE_STARTLOG_CLAIMS() 02233 #define PERFINFO_WSMANAGE_STARTLOG_FAULTS() 02234 #define PERFINFO_WSMANAGE_TOTRIM(Trim) 02235 #define PERFINFO_WSMANAGE_TRIMACTION(TrimAction) 02236 #define PERFINFO_WSMANAGE_TRIMEND_CLAIMS(Criteria) 02237 #define PERFINFO_WSMANAGE_TRIMEND_FAULTS(Criteria) 02238 #define PERFINFO_WSMANAGE_TRIMWS(Process, SessionSpace, VmSupport) 02239 #define PERFINFO_WSMANAGE_TRIMWS_CLAIMINFO(VmSupport) 02240 #define PERFINFO_WSMANAGE_TRIMWS_CLAIMINFO(VmSupport) 02241 #define PERFINFO_WSMANAGE_WAITFORWRITER_CLAIMS() 02242 #define PERFINFO_WSMANAGE_WAITFORWRITER_FAULTS() 02243 #define PERFINFO_WSMANAGE_WILLTRIM(ReductionGoal, FreeGoal) 02244 #define PERFINFO_WSMANAGE_WILLTRIM_CLAIMS(Criteria) 02245 #define PERFINFO_WSMANAGE_WILLTRIM_FAULTS(Criteria) 02246 02247 #define PERFINFO_DO_PAGEFAULT_CLUSTERING() 1 02248 #endif // NTPERF 02249 02250 #endif // MM

Generated on Sat May 15 19:40:50 2004 for test by doxygen 1.3.7