MiAllocateCrcList
_MI_PAGE_CRCS *__stdcall MiAllocateCrcList(_MI_PAGE_COMBINING_SUPPORT *Pcs, UINT64 *ArgumentBytes){
UINT64 *v2;
_MI_PARTITION *Partition;
UINT64 *v4;
unsigned __int64 v5;
unsigned __int64 v6;
unsigned __int64 v7;
UINT64 v8;
_MI_PAGE_CRCS *result;
Partition = Pcs->Partition;
v4 = v2;
MiGetPrivatePageCount(Pcs->Partition);
if( (signed __int64)(Partition->Vp.ResidentAvailablePages - 1024) <= 0
|| Partition->Vp.TotalCommittedPages >= Partition->Vp.TotalCommitLimit )
{
return 0i64;
}
LODWORD(v5) = MiGetAvailablePagesBelowPriority(Partition, 2ui64);
v7 = v5;
if( v6 <= v5 )
v7 = v6;
v8 = v7 << 12;
if( v8 < 0x200000 )
v8 = 0x200000i64;
while( 1 )
{
result = (_MI_PAGE_CRCS *)MiAllocatePool(64i64, v8, 0x6D75534Dui64);
if( result )
break;
v8 >>= 1;
if( v8 < 0x10000 )
return result;
}
*v4 = v8;
return result;
}Referenced by:
MiCombineAllPhysicalMemory