mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[NTOS:MM] Fix MmSizeOfSystemCacheInPages value on AMD64
And add 'ASSERT(MmSystemCacheEnd == ...);'.
Addendum to d56a249089
.
CORE-14259
This commit is contained in:
parent
4253ba71fc
commit
6ba611f39e
1 changed files with 6 additions and 1 deletions
|
@ -2521,11 +2521,16 @@ MmArmInitSystem(IN ULONG Phase,
|
|||
|
||||
/* Define limits for system cache */
|
||||
#ifdef _M_AMD64
|
||||
MmSizeOfSystemCacheInPages = (MI_SYSTEM_CACHE_END - MI_SYSTEM_CACHE_START) / PAGE_SIZE;
|
||||
MmSizeOfSystemCacheInPages = ((MI_SYSTEM_CACHE_END + 1) - MI_SYSTEM_CACHE_START) / PAGE_SIZE;
|
||||
#else
|
||||
MmSizeOfSystemCacheInPages = ((ULONG_PTR)MI_PAGED_POOL_START - (ULONG_PTR)MI_SYSTEM_CACHE_START) / PAGE_SIZE;
|
||||
#endif
|
||||
MmSystemCacheEnd = (PVOID)((ULONG_PTR)MmSystemCacheStart + (MmSizeOfSystemCacheInPages * PAGE_SIZE) - 1);
|
||||
#ifdef _M_AMD64
|
||||
ASSERT(MmSystemCacheEnd == (PVOID)MI_SYSTEM_CACHE_END);
|
||||
#else
|
||||
ASSERT(MmSystemCacheEnd == (PVOID)((ULONG_PTR)MI_PAGED_POOL_START - 1));
|
||||
#endif
|
||||
|
||||
/* Initialize the system cache */
|
||||
//MiInitializeSystemCache(MmSystemCacheWsMinimum, MmAvailablePages);
|
||||
|
|
Loading…
Reference in a new issue