[NTOSKRNL] Add back parentheses that got removed in r75605
[reactos.git] / ntoskrnl / include / internal / mm.h
index af0d03d..694c51f 100644 (file)
@@ -115,7 +115,8 @@ typedef ULONG_PTR SWAPENTRY;
      PAGE_EXECUTE_READ | \
      PAGE_EXECUTE_READWRITE | \
      PAGE_EXECUTE_WRITECOPY | \
-     PAGE_NOACCESS)
+     PAGE_NOACCESS | \
+     PAGE_NOCACHE)
 
 #define PAGE_IS_READABLE                    \
     (PAGE_READONLY | \
@@ -199,13 +200,13 @@ typedef struct _ROS_SECTION_OBJECT
     };
 } ROS_SECTION_OBJECT, *PROS_SECTION_OBJECT;
 
+#define MA_GetStartingAddress(_MemoryArea) ((_MemoryArea)->VadNode.StartingVpn << PAGE_SHIFT)
+#define MA_GetEndingAddress(_MemoryArea) (((_MemoryArea)->VadNode.EndingVpn + 1) << PAGE_SHIFT)
+
 typedef struct _MEMORY_AREA
 {
-    PVOID StartingAddress;
-    PVOID EndingAddress;
-    struct _MEMORY_AREA *Parent;
-    struct _MEMORY_AREA *LeftChild;
-    struct _MEMORY_AREA *RightChild;
+    MMVAD VadNode;
+
     ULONG Type;
     ULONG Protect;
     ULONG Flags;
@@ -483,7 +484,6 @@ MmCreateMemoryArea(
     SIZE_T Length,
     ULONG Protection,
     PMEMORY_AREA *Result,
-    BOOLEAN FixedAddress,
     ULONG AllocationFlags,
     ULONG AllocationGranularity
 );
@@ -495,14 +495,6 @@ MmLocateMemoryAreaByAddress(
     PVOID Address
 );
 
-// fixme: unused?
-ULONG_PTR
-NTAPI
-MmFindGapAtAddress_(
-    PMMSUPPORT AddressSpace,
-    PVOID Address
-);
-
 NTSTATUS
 NTAPI
 MmFreeMemoryArea(
@@ -512,14 +504,11 @@ MmFreeMemoryArea(
     PVOID FreePageContext
 );
 
-NTSTATUS
+VOID
 NTAPI
-MmFreeMemoryAreaByPtr(
-    PMMSUPPORT AddressSpace,
-    PVOID BaseAddress,
-    PMM_FREE_PAGE_FUNC FreePage,
-    PVOID FreePageContext
-);
+MiRosCleanupMemoryArea(
+    PEPROCESS Process,
+    PMMVAD Vad);
 
 PMEMORY_AREA
 NTAPI
@@ -538,13 +527,6 @@ MmFindGap(
     BOOLEAN TopDown
 );
 
-VOID
-NTAPI
-MmMapMemoryArea(PVOID BaseAddress,
-                SIZE_T Length,
-                ULONG Consumer,
-                ULONG Protection);
-
 VOID
 NTAPI
 MiRosCheckMemoryAreas(
@@ -648,6 +630,13 @@ VOID
 NTAPI
 MmShowOutOfSpaceMessagePagingFile(VOID);
 
+NTSTATUS
+NTAPI
+MiReadPageFile(
+    _In_ PFN_NUMBER Page,
+    _In_ ULONG PageFileIndex,
+    _In_ ULONG_PTR PageFileOffset);
+
 /* process.c ****************************************************************/
 
 NTSTATUS
@@ -719,7 +708,7 @@ MmPageFault(
 
 VOID
 NTAPI
-MiInitializeSpecialPool();
+MiInitializeSpecialPool(VOID);
 
 BOOLEAN
 NTAPI
@@ -732,6 +721,11 @@ NTAPI
 MmIsSpecialPoolAddress(
     IN PVOID P);
 
+BOOLEAN
+NTAPI
+MmIsSpecialPoolAddressFree(
+    IN PVOID P);
+
 PVOID
 NTAPI
 MmAllocateSpecialPool(
@@ -1151,7 +1145,6 @@ NTAPI
 MmDeleteVirtualMapping(
     struct _EPROCESS *Process,
     PVOID Address,
-    BOOLEAN FreePage,
     BOOLEAN* WasDirty,
     PPFN_NUMBER Page
 );
@@ -1391,6 +1384,11 @@ ExpCheckPoolAllocation(
     POOL_TYPE PoolType,
     ULONG Tag);
 
+VOID
+NTAPI
+ExReturnPoolQuota(
+    IN PVOID P);
+
 
 /* mmsup.c *****************************************************************/