[NTOSKRNL]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 22 Jul 2010 23:22:57 +0000 (23:22 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 22 Jul 2010 23:22:57 +0000 (23:22 +0000)
- Add some missing constants for amd64
- Fix compilation of kd64
- Make MmAllocationFragment a SIZE_T

svn path=/trunk/; revision=48204

reactos/ntoskrnl/include/internal/amd64/mm.h
reactos/ntoskrnl/kd64/kddata.c
reactos/ntoskrnl/mm/ARM3/miarm.h
reactos/ntoskrnl/mm/section.c

index 1889c64..f0d4342 100644 (file)
@@ -25,6 +25,8 @@
 
 #define MI_LOWEST_VAD_ADDRESS           (PVOID)0x000000007FF00000ULL
 
 
 #define MI_LOWEST_VAD_ADDRESS           (PVOID)0x000000007FF00000ULL
 
+#define MI_SYSTEM_PTE_BASE              (PVOID)MiAddressToPte(KSEG0_BASE)
+
 /* Memory sizes */
 #define MI_MIN_PAGES_FOR_NONPAGED_POOL_TUNING ((255*1024*1024) >> PAGE_SHIFT)
 #define MI_MIN_PAGES_FOR_SYSPTE_TUNING         ((19*1024*1024) >> PAGE_SHIFT)
 /* Memory sizes */
 #define MI_MIN_PAGES_FOR_NONPAGED_POOL_TUNING ((255*1024*1024) >> PAGE_SHIFT)
 #define MI_MIN_PAGES_FOR_SYSPTE_TUNING         ((19*1024*1024) >> PAGE_SHIFT)
 #define MI_SECONDARY_COLORS                     64
 #define MI_MAX_SECONDARY_COLORS                 1024
 
 #define MI_SECONDARY_COLORS                     64
 #define MI_MAX_SECONDARY_COLORS                 1024
 
+#define MI_MIN_ALLOCATION_FRAGMENT              (4 * _1KB)
+#define MI_ALLOCATION_FRAGMENT                  (64 * _1KB)
+#define MI_MAX_ALLOCATION_FRAGMENT              (2  * _1MB)
+
 #define MM_HIGHEST_VAD_ADDRESS \
     (PVOID)((ULONG_PTR)MM_HIGHEST_USER_ADDRESS - (16 * PAGE_SIZE))
 
 #define MM_HIGHEST_VAD_ADDRESS \
     (PVOID)((ULONG_PTR)MM_HIGHEST_USER_ADDRESS - (16 * PAGE_SIZE))
 
index edce7d7..895753a 100644 (file)
@@ -9,9 +9,9 @@
 /* INCLUDES ******************************************************************/
 
 #include <ntoskrnl.h>
 /* INCLUDES ******************************************************************/
 
 #include <ntoskrnl.h>
-#include "../mm/ARM3/miarm.h"
 #define NDEBUG
 #include <debug.h>
 #define NDEBUG
 #include <debug.h>
+#include "../mm/ARM3/miarm.h"
 
 VOID NTAPI RtlpBreakWithStatusInstruction(VOID);
 
 
 VOID NTAPI RtlpBreakWithStatusInstruction(VOID);
 
index e7b22e2..417544c 100644 (file)
@@ -33,7 +33,6 @@
 #define MI_NONPAGED_POOL_END                    (PVOID)0xFFBE0000
 #define MI_DEBUG_MAPPING                        (PVOID)0xFFBFF000
 
 #define MI_NONPAGED_POOL_END                    (PVOID)0xFFBE0000
 #define MI_DEBUG_MAPPING                        (PVOID)0xFFBFF000
 
-// on AMD64 this would be MiAddressToPte(MM_KSEG0_BASE)
 #define MI_SYSTEM_PTE_BASE                      (PVOID)MiAddressToPte(NULL)
 
 #define MI_MIN_SECONDARY_COLORS                 8
 #define MI_SYSTEM_PTE_BASE                      (PVOID)MiAddressToPte(NULL)
 
 #define MI_MIN_SECONDARY_COLORS                 8
@@ -392,7 +391,7 @@ extern BOOLEAN MmDynamicPfn;
 extern BOOLEAN MmMirroring;
 extern BOOLEAN MmMakeLowMemory;
 extern BOOLEAN MmEnforceWriteProtection;
 extern BOOLEAN MmMirroring;
 extern BOOLEAN MmMakeLowMemory;
 extern BOOLEAN MmEnforceWriteProtection;
-extern ULONG MmAllocationFragment;
+extern SIZE_T MmAllocationFragment;
 extern ULONG MmConsumedPoolPercentage;
 extern ULONG MmVerifyDriverBufferType;
 extern ULONG MmVerifyDriverLevel;
 extern ULONG MmConsumedPoolPercentage;
 extern ULONG MmVerifyDriverBufferType;
 extern ULONG MmVerifyDriverLevel;
index 8761620..a09a0a3 100644 (file)
@@ -71,7 +71,7 @@ MM_SECTION_PAGEOUT_CONTEXT;
 
 POBJECT_TYPE MmSectionObjectType = NULL;
 
 
 POBJECT_TYPE MmSectionObjectType = NULL;
 
-BOOLEAN MmAllocationFragment;
+SIZE_T MmAllocationFragment;
 
 ULONG_PTR MmSubsectionBase;
 
 
 ULONG_PTR MmSubsectionBase;