Return correct hugePages count if NUMA mode used.

This commit is contained in:
XMRig 2019-07-27 21:31:11 +07:00
parent 828fc065b0
commit 9df9275120
4 changed files with 27 additions and 9 deletions

View file

@ -112,7 +112,7 @@ bool xmrig::RxDataset::isReady(const void *seed, const Algorithm &algorithm) con
std::pair<size_t, size_t> xmrig::RxDataset::hugePages() const
{
constexpr size_t twoMiB = 2u * 1024u * 1024u;
constexpr size_t twoMiB = 2u * 1024u * 1024u;
constexpr const size_t total = (VirtualMemory::align(size(), twoMiB) + VirtualMemory::align(RxCache::size(), twoMiB)) / twoMiB;
size_t count = 0;