mirror of https://gitee.com/bigwinds/arangodb
MSVC
This commit is contained in:
parent
f72f53d6ca
commit
779755b605
|
@ -264,8 +264,8 @@ bool Cache::reclaimMemory(uint64_t size) {
|
|||
}
|
||||
|
||||
uint32_t Cache::hashKey(void const* key, uint32_t keySize) const {
|
||||
return std::max(static_cast<uint32_t>(1),
|
||||
fasthash32(key, keySize, 0xdeadbeefUL));
|
||||
return (std::max)(static_cast<uint32_t>(1),
|
||||
fasthash32(key, keySize, 0xdeadbeefUL));
|
||||
}
|
||||
|
||||
void Cache::recordStat(Cache::Stat stat) {
|
||||
|
|
|
@ -494,11 +494,11 @@ uint64_t Manager::resizeAllCaches(Manager::TaskEnvironment environment,
|
|||
if (aggressive) {
|
||||
newLimit =
|
||||
(noTasks ? metadata->usage()
|
||||
: std::min(metadata->usage(), metadata->hardLimit() / 4));
|
||||
: (std::min)(metadata->usage(), metadata->hardLimit() / 4));
|
||||
} else {
|
||||
newLimit =
|
||||
(noTasks ? std::max(metadata->usage(), metadata->hardLimit() / 2)
|
||||
: std::min(metadata->usage(), metadata->hardLimit() / 2));
|
||||
(noTasks ? (std::max)(metadata->usage(), metadata->hardLimit() / 2)
|
||||
: (std::min)(metadata->usage(), metadata->hardLimit() / 2));
|
||||
}
|
||||
newLimit = (std::max)(newLimit, MIN_CACHE_SIZE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue