Use uv_get_free_memory.

This commit is contained in:
XMRig 2019-11-29 13:12:36 +07:00
parent 64fb4f265b
commit c529770d38
No known key found for this signature in database
GPG key ID: 446A53638BE94409
3 changed files with 7 additions and 3 deletions

View file

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