[NTOSKRNL] Add back parentheses that got removed in r75605
[reactos.git] / ntoskrnl / include / internal / mm.h
index 0eeccc4..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
@@ -1395,6 +1384,11 @@ ExpCheckPoolAllocation(
     POOL_TYPE PoolType,
     ULONG Tag);
 
+VOID
+NTAPI
+ExReturnPoolQuota(
+    IN PVOID P);
+
 
 /* mmsup.c *****************************************************************/