[NTOSKRNL:CC] Implementation of CcGetNumberOfMappedPages

Added CcGetNumberOfMappedPages,
这个提交包含在:
2024-05-24 10:32:14 +02:00
父节点 5d6f81cb08
当前提交 4784e99b74

查看文件

@@ -477,4 +477,22 @@ CcGetCachedDirtyPageCountForFile(PSECTION_OBJECT_POINTERS SectionObjectPointer)
return DIRTYPAGES;
}
VOID NTAPI CcGetNumberOfMappedPages(
PSECTION_OBJECT_POINTERS SectionObjectPointers,
PULONG NoMappedVacbPage,
PULONG NoActivePages)
{
PSHARED_CACHE_MAP SharedCacheMap = SectionObjectPointers->SharedCacheMap;
*NoMappedVacbPage = nullptr;
*NoActivePages = nullptr;
if (SharedCacheMap)
{
SpinLockSharedGuard guard(&SharedCacheMap->VacbLock);
/*Calculate the number of pages based on NumMappedVacb and NumActiveVacb by Doing Half Page Shift*/
NoMappedVacbPage = &SharedCacheMap->NumMappedVacb << 6;
NoActivePages = &SharedCacheMap->NumActiveVacb << 6;
}
return;
}