ExpComputeLookasideDepth
VOID __stdcall ExpComputeLookasideDepth(_GENERAL_LOOKASIDE *Lookaside, UINT64 Misses, UINT64 ScanPeriod){
unsigned int TotalAllocates;
unsigned int v5;
int MaximumDepth;
int Depth;
int v8;
unsigned int v9;
unsigned int v10;
TotalAllocates = Lookaside->TotalAllocates;
v5 = TotalAllocates - Lookaside->LastTotalAllocates;
MaximumDepth = Lookaside->MaximumDepth;
Lookaside->LastTotalAllocates = TotalAllocates;
if( (_WORD)MaximumDepth != 0xFFFF )
{
Depth = Lookaside->Depth;
if( v5 >= 25 * (int)ScanPeriod )
{
v9 = 1000 * (int)Misses / v5;
if( v9 >= 5 )
{
v10 = v9 * (MaximumDepth - Depth) / 0x7D0 + 5;
if( v10 > 0x1E )
v10 = 30;
v8 = v10 + Depth;
if( v8 > MaximumDepth )
LOWORD(v8) = MaximumDepth;
goto LABEL_6;
}
v8 = Depth - 1;
}
else
{
v8 = Depth - 10;
}
if( v8 < 4 )
LOWORD(v8) = 4;
LABEL_6:
Lookaside->Depth = v8;
}
}Referenced by:
ExpScanSystemLookasideList