ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

mmtypes.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  *                         Memory manager Types                               *
00003  ******************************************************************************/
00004 $if (_WDMDDK_)
00005 
00006 #if (NTDDI_VERSION >= NTDDI_WIN2K)
00007 typedef ULONG NODE_REQUIREMENT;
00008 #define MM_ANY_NODE_OK                           0x80000000
00009 #endif
00010 
00011 #define MM_DONT_ZERO_ALLOCATION                  0x00000001
00012 #define MM_ALLOCATE_FROM_LOCAL_NODE_ONLY         0x00000002
00013 #define MM_ALLOCATE_FULLY_REQUIRED               0x00000004
00014 #define MM_ALLOCATE_NO_WAIT                      0x00000008
00015 #define MM_ALLOCATE_PREFER_CONTIGUOUS            0x00000010
00016 #define MM_ALLOCATE_REQUIRE_CONTIGUOUS_CHUNKS    0x00000020
00017 
00018 #define MDL_MAPPED_TO_SYSTEM_VA     0x0001
00019 #define MDL_PAGES_LOCKED            0x0002
00020 #define MDL_SOURCE_IS_NONPAGED_POOL 0x0004
00021 #define MDL_ALLOCATED_FIXED_SIZE    0x0008
00022 #define MDL_PARTIAL                 0x0010
00023 #define MDL_PARTIAL_HAS_BEEN_MAPPED 0x0020
00024 #define MDL_IO_PAGE_READ            0x0040
00025 #define MDL_WRITE_OPERATION         0x0080
00026 #define MDL_PARENT_MAPPED_SYSTEM_VA 0x0100
00027 #define MDL_FREE_EXTRA_PTES         0x0200
00028 #define MDL_DESCRIBES_AWE           0x0400
00029 #define MDL_IO_SPACE                0x0800
00030 #define MDL_NETWORK_HEADER          0x1000
00031 #define MDL_MAPPING_CAN_FAIL        0x2000
00032 #define MDL_ALLOCATED_MUST_SUCCEED  0x4000
00033 #define MDL_INTERNAL                0x8000
00034 
00035 #define MDL_MAPPING_FLAGS (MDL_MAPPED_TO_SYSTEM_VA     | \
00036                            MDL_PAGES_LOCKED            | \
00037                            MDL_SOURCE_IS_NONPAGED_POOL | \
00038                            MDL_PARTIAL_HAS_BEEN_MAPPED | \
00039                            MDL_PARENT_MAPPED_SYSTEM_VA | \
00040                            MDL_SYSTEM_VA               | \
00041                            MDL_IO_SPACE)
00042 
00043 #define FLUSH_MULTIPLE_MAXIMUM       32
00044 
00045 /* Section access rights */
00046 #define SECTION_QUERY                0x0001
00047 #define SECTION_MAP_WRITE            0x0002
00048 #define SECTION_MAP_READ             0x0004
00049 #define SECTION_MAP_EXECUTE          0x0008
00050 #define SECTION_EXTEND_SIZE          0x0010
00051 #define SECTION_MAP_EXECUTE_EXPLICIT 0x0020
00052 
00053 #define SECTION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SECTION_QUERY| \
00054                             SECTION_MAP_WRITE |                     \
00055                             SECTION_MAP_READ |                      \
00056                             SECTION_MAP_EXECUTE |                   \
00057                             SECTION_EXTEND_SIZE)
00058 
00059 #define SESSION_QUERY_ACCESS         0x0001
00060 #define SESSION_MODIFY_ACCESS        0x0002
00061 
00062 #define SESSION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |  \
00063                             SESSION_QUERY_ACCESS     |  \
00064                             SESSION_MODIFY_ACCESS)
00065 
00066 #define SEGMENT_ALL_ACCESS SECTION_ALL_ACCESS
00067 
00068 #define PAGE_NOACCESS          0x01
00069 #define PAGE_READONLY          0x02
00070 #define PAGE_READWRITE         0x04
00071 #define PAGE_WRITECOPY         0x08
00072 #define PAGE_EXECUTE           0x10
00073 #define PAGE_EXECUTE_READ      0x20
00074 #define PAGE_EXECUTE_READWRITE 0x40
00075 #define PAGE_EXECUTE_WRITECOPY 0x80
00076 #define PAGE_GUARD            0x100
00077 #define PAGE_NOCACHE          0x200
00078 #define PAGE_WRITECOMBINE     0x400
00079 
00080 #define MEM_COMMIT           0x1000
00081 #define MEM_RESERVE          0x2000
00082 #define MEM_DECOMMIT         0x4000
00083 #define MEM_RELEASE          0x8000
00084 #define MEM_FREE            0x10000
00085 #define MEM_PRIVATE         0x20000
00086 #define MEM_MAPPED          0x40000
00087 #define MEM_RESET           0x80000
00088 #define MEM_TOP_DOWN       0x100000
00089 #define MEM_LARGE_PAGES  0x20000000
00090 #define MEM_4MB_PAGES    0x80000000
00091 
00092 #define SEC_RESERVE       0x4000000
00093 #define SEC_COMMIT        0x8000000
00094 #define SEC_LARGE_PAGES  0x80000000
00095 
00096 /* Section map options */
00097 typedef enum _SECTION_INHERIT {
00098   ViewShare = 1,
00099   ViewUnmap = 2
00100 } SECTION_INHERIT;
00101 
00102 typedef ULONG PFN_COUNT;
00103 typedef LONG_PTR SPFN_NUMBER, *PSPFN_NUMBER;
00104 typedef ULONG_PTR PFN_NUMBER, *PPFN_NUMBER;
00105 
00106 _Struct_size_bytes_(_Inexpressible_(sizeof(struct _MDL) +
00107     (ByteOffset + ByteCount + PAGE_SIZE-1) / PAGE_SIZE * sizeof(PFN_NUMBER)))
00108 typedef struct _MDL {
00109   struct _MDL *Next;
00110   CSHORT Size;
00111   CSHORT MdlFlags;
00112   struct _EPROCESS *Process;
00113   PVOID MappedSystemVa;
00114   PVOID StartVa;
00115   ULONG ByteCount;
00116   ULONG ByteOffset;
00117 } MDL, *PMDL;
00118 #if (_MSC_VER >= 1600)
00119 typedef _Readable_bytes_(_Inexpressible_(polymorphism)) MDL *PMDLX;
00120 #else
00121 typedef MDL *PMDLX;
00122 #endif
00123 
00124 typedef enum _MEMORY_CACHING_TYPE_ORIG {
00125   MmFrameBufferCached = 2
00126 } MEMORY_CACHING_TYPE_ORIG;
00127 
00128 typedef enum _MEMORY_CACHING_TYPE {
00129   MmNonCached = FALSE,
00130   MmCached = TRUE,
00131   MmWriteCombined = MmFrameBufferCached,
00132   MmHardwareCoherentCached,
00133   MmNonCachedUnordered,
00134   MmUSWCCached,
00135   MmMaximumCacheType
00136 } MEMORY_CACHING_TYPE;
00137 
00138 typedef enum _MM_PAGE_PRIORITY {
00139   LowPagePriority,
00140   NormalPagePriority = 16,
00141   HighPagePriority = 32
00142 } MM_PAGE_PRIORITY;
00143 
00144 typedef enum _MM_SYSTEM_SIZE {
00145   MmSmallSystem,
00146   MmMediumSystem,
00147   MmLargeSystem
00148 } MM_SYSTEMSIZE;
00149 
00150 extern NTKERNELAPI BOOLEAN Mm64BitPhysicalAddress;
00151 extern PVOID MmBadPointer;
00152 
00153 $endif (_WDMDDK_)
00154 $if (_NTDDK_)
00155 
00156 typedef struct _PHYSICAL_MEMORY_RANGE {
00157   PHYSICAL_ADDRESS BaseAddress;
00158   LARGE_INTEGER NumberOfBytes;
00159 } PHYSICAL_MEMORY_RANGE, *PPHYSICAL_MEMORY_RANGE;
00160 
00161 typedef NTSTATUS
00162 (NTAPI *PMM_ROTATE_COPY_CALLBACK_FUNCTION)(
00163   _In_ PMDL DestinationMdl,
00164   _In_ PMDL SourceMdl,
00165   _In_ PVOID Context);
00166 
00167 typedef enum _MM_ROTATE_DIRECTION {
00168   MmToFrameBuffer,
00169   MmToFrameBufferNoCopy,
00170   MmToRegularMemory,
00171   MmToRegularMemoryNoCopy,
00172   MmMaximumRotateDirection
00173 } MM_ROTATE_DIRECTION, *PMM_ROTATE_DIRECTION;
00174 
00175 $endif (_NTDDK_)
00176 $if (_NTIFS_)
00177 typedef enum _MMFLUSH_TYPE {
00178   MmFlushForDelete,
00179   MmFlushForWrite
00180 } MMFLUSH_TYPE;
00181 
00182 typedef struct _READ_LIST {
00183   PFILE_OBJECT FileObject;
00184   ULONG NumberOfEntries;
00185   LOGICAL IsImage;
00186   FILE_SEGMENT_ELEMENT List[ANYSIZE_ARRAY];
00187 } READ_LIST, *PREAD_LIST;
00188 
00189 #if (NTDDI_VERSION >= NTDDI_WINXP)
00190 
00191 typedef union _MM_PREFETCH_FLAGS {
00192   struct {
00193     ULONG Priority : SYSTEM_PAGE_PRIORITY_BITS;
00194     ULONG RepurposePriority : SYSTEM_PAGE_PRIORITY_BITS;
00195   } Flags;
00196   ULONG AllFlags;
00197 } MM_PREFETCH_FLAGS, *PMM_PREFETCH_FLAGS;
00198 
00199 #define MM_PREFETCH_FLAGS_MASK ((1 << (2*SYSTEM_PAGE_PRIORITY_BITS)) - 1)
00200 
00201 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
00202 
00203 #define HEAP_NO_SERIALIZE               0x00000001
00204 #define HEAP_GROWABLE                   0x00000002
00205 #define HEAP_GENERATE_EXCEPTIONS        0x00000004
00206 #define HEAP_ZERO_MEMORY                0x00000008
00207 #define HEAP_REALLOC_IN_PLACE_ONLY      0x00000010
00208 #define HEAP_TAIL_CHECKING_ENABLED      0x00000020
00209 #define HEAP_FREE_CHECKING_ENABLED      0x00000040
00210 #define HEAP_DISABLE_COALESCE_ON_FREE   0x00000080
00211 
00212 #define HEAP_CREATE_ALIGN_16            0x00010000
00213 #define HEAP_CREATE_ENABLE_TRACING      0x00020000
00214 #define HEAP_CREATE_ENABLE_EXECUTE      0x00040000
00215 
00216 #define HEAP_SETTABLE_USER_VALUE        0x00000100
00217 #define HEAP_SETTABLE_USER_FLAG1        0x00000200
00218 #define HEAP_SETTABLE_USER_FLAG2        0x00000400
00219 #define HEAP_SETTABLE_USER_FLAG3        0x00000800
00220 #define HEAP_SETTABLE_USER_FLAGS        0x00000E00
00221 
00222 #define HEAP_CLASS_0                    0x00000000
00223 #define HEAP_CLASS_1                    0x00001000
00224 #define HEAP_CLASS_2                    0x00002000
00225 #define HEAP_CLASS_3                    0x00003000
00226 #define HEAP_CLASS_4                    0x00004000
00227 #define HEAP_CLASS_5                    0x00005000
00228 #define HEAP_CLASS_6                    0x00006000
00229 #define HEAP_CLASS_7                    0x00007000
00230 #define HEAP_CLASS_8                    0x00008000
00231 #define HEAP_CLASS_MASK                 0x0000F000
00232 
00233 #define HEAP_MAXIMUM_TAG                0x0FFF
00234 #define HEAP_GLOBAL_TAG                 0x0800
00235 #define HEAP_PSEUDO_TAG_FLAG            0x8000
00236 #define HEAP_TAG_SHIFT                  18
00237 #define HEAP_TAG_MASK                  (HEAP_MAXIMUM_TAG << HEAP_TAG_SHIFT)
00238 
00239 #define HEAP_CREATE_VALID_MASK         (HEAP_NO_SERIALIZE             |   \
00240                                         HEAP_GROWABLE                 |   \
00241                                         HEAP_GENERATE_EXCEPTIONS      |   \
00242                                         HEAP_ZERO_MEMORY              |   \
00243                                         HEAP_REALLOC_IN_PLACE_ONLY    |   \
00244                                         HEAP_TAIL_CHECKING_ENABLED    |   \
00245                                         HEAP_FREE_CHECKING_ENABLED    |   \
00246                                         HEAP_DISABLE_COALESCE_ON_FREE |   \
00247                                         HEAP_CLASS_MASK               |   \
00248                                         HEAP_CREATE_ALIGN_16          |   \
00249                                         HEAP_CREATE_ENABLE_TRACING    |   \
00250                                         HEAP_CREATE_ENABLE_EXECUTE)
00251 $endif (_NTIFS_)
00252 

Generated on Thu May 24 2012 04:31:24 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.