[NTOSKRNL]

- Raise system PTE count to 44000 for system with more than 256MB of RAM.
- http://www.osronline.com/ddkx/appendix/enhancements5_3oc3.htm claims that winXP supports a 960MB-contiguous mapping...

svn path=/trunk/; revision=56943
This commit is contained in:
Jérôme Gardou 2012-07-23 00:52:01 +00:00
parent 78bdedec32
commit a3e1af9897
2 changed files with 11 additions and 1 deletions

View file

@ -11,6 +11,7 @@
#define MI_MIN_PAGES_FOR_NONPAGED_POOL_TUNING ((255 * _1MB) >> PAGE_SHIFT)
#define MI_MIN_PAGES_FOR_SYSPTE_TUNING ((19 * _1MB) >> PAGE_SHIFT)
#define MI_MIN_PAGES_FOR_SYSPTE_BOOST ((32 * _1MB) >> PAGE_SHIFT)
#define MI_MIN_PAGES_FOR_SYSPTE_BOOST_BOOST ((256 * _1MB) >> PAGE_SHIFT)
#define MI_MAX_INIT_NONPAGED_POOL_SIZE (128 * _1MB)
#define MI_MAX_NONPAGED_POOL_SIZE (128 * _1MB)
#define MI_MAX_FREE_PAGE_LISTS 4
@ -50,6 +51,8 @@
(PVOID)((ULONG_PTR)MM_HIGHEST_USER_ADDRESS - (16 * PAGE_SIZE))
#define MI_LOWEST_VAD_ADDRESS (PVOID)MM_LOWEST_USER_ADDRESS
#define MI_DEFAULT_SYSTEM_PTE_COUNT 50000
#endif /* !_M_AMD64 */
/* Make the code cleaner with some definitions for size multiples */

View file

@ -2108,7 +2108,7 @@ MmArmInitSystem(IN ULONG Phase,
else
{
//
// Use the default, but check if we have more than 32MB of RAM
// Use the default
//
MmNumberOfSystemPtes = 11000;
if (PageCount > MI_MIN_PAGES_FOR_SYSPTE_BOOST)
@ -2118,6 +2118,13 @@ MmArmInitSystem(IN ULONG Phase,
//
MmNumberOfSystemPtes <<= 1;
}
if (PageCount > MI_MIN_PAGES_FOR_SYSPTE_BOOST_BOOST)
{
//
// Double the amount of system PTEs
//
MmNumberOfSystemPtes <<= 1;
}
}
DPRINT("System PTE count has been tuned to %d (%d bytes)\n",