Use total memory (Linux report low free memory) and fix typo.

This commit is contained in:
XMRig 2019-11-29 13:43:26 +07:00
parent c7d2639010
commit 8791261220
No known key found for this signature in database
GPG key ID: 446A53638BE94409
2 changed files with 2 additions and 2 deletions

View file

@ -74,5 +74,5 @@ xmrig::RxConfig::Mode xmrig::RxConfig::readMode(const rapidjson::Value &value) c
}
}
return LightMode;
return AutoMode;
}

View file

@ -167,7 +167,7 @@ void xmrig::RxDataset::allocate(bool hugePages)
return;
}
if (m_mode == RxConfig::AutoMode && uv_get_free_memory() < (maxSize() + RxCache::maxSize())) {
if (m_mode == RxConfig::AutoMode && uv_get_total_memory() < (maxSize() + RxCache::maxSize())) {
LOG_ERR(CLEAR "%s" RED_BOLD_S "not enough memory for RandomX dataset", rx_tag());
return;