Implemented RxNUMAStorage.
This commit is contained in:
parent
ad6dc876b3
commit
05928ccc25
9 changed files with 306 additions and 61 deletions
|
@ -25,8 +25,9 @@
|
|||
*/
|
||||
|
||||
|
||||
#include "crypto/randomx/randomx.h"
|
||||
#include "crypto/rx/RxCache.h"
|
||||
#include "crypto/common/VirtualMemory.h"
|
||||
#include "crypto/randomx/randomx.h"
|
||||
|
||||
|
||||
static_assert(RANDOMX_FLAG_JIT == 8, "RANDOMX_FLAG_JIT flag mismatch");
|
||||
|
@ -72,3 +73,17 @@ bool xmrig::RxCache::init(const Buffer &seed)
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
std::pair<uint32_t, uint32_t> xmrig::RxCache::hugePages() const
|
||||
{
|
||||
constexpr size_t twoMiB = 2u * 1024u * 1024u;
|
||||
constexpr size_t total = VirtualMemory::align(maxSize(), twoMiB) / twoMiB;
|
||||
|
||||
uint32_t count = 0;
|
||||
if (isHugePages()) {
|
||||
count += total;
|
||||
}
|
||||
|
||||
return { count, total };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue