static size_t EPSILON = 2 * 1024;
size_t aMax = std::max(theSize, theMinSize);
size_t aMin = std::min(theSize, theMinSize);
- cout<<"GetAvailableMemory - "<<aMax<<"; "<<aMin;
+ //cout<<"GetAvailableMemory - "<<aMax<<"; "<<aMin;
while(CheckAvailableMemory(aMax) == 0 && CheckAvailableMemory(aMin) > 0 && (aMax - aMin) > EPSILON){
size_t aRoot = (aMax + aMin) / 2;
if(CheckAvailableMemory(aRoot))
else
aMax = aRoot;
}
- cout<<"; "<<aMax<<endl;
+ //cout<<"; "<<aMax<<endl;
return aMax;
}