Fixed Linux build.
This commit is contained in:
parent
68d77b02d7
commit
0e0a26f644
@ -28,6 +28,7 @@
|
|||||||
#define XMRIG_IMEMORYPOOL_H
|
#define XMRIG_IMEMORYPOOL_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@ xmrig::CpuWorker<N>::CpuWorker(size_t id, const CpuLaunchData &data) :
|
|||||||
m_miner(data.miner),
|
m_miner(data.miner),
|
||||||
m_ctx()
|
m_ctx()
|
||||||
{
|
{
|
||||||
m_memory = new VirtualMemory(m_algorithm.l3() * N, data.hugePages, true);
|
m_memory = new VirtualMemory(m_algorithm.l3() * N, data.hugePages, true, m_node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -107,7 +107,7 @@ bool xmrig::VirtualMemory::allocateLargePagesMemory()
|
|||||||
if (m_scratchpad) {
|
if (m_scratchpad) {
|
||||||
m_flags.set(FLAG_HUGEPAGES, true);
|
m_flags.set(FLAG_HUGEPAGES, true);
|
||||||
|
|
||||||
madvise(m_scratchpad, size, MADV_RANDOM | MADV_WILLNEED);
|
madvise(m_scratchpad, m_size, MADV_RANDOM | MADV_WILLNEED);
|
||||||
|
|
||||||
if (mlock(m_scratchpad, m_size) == 0) {
|
if (mlock(m_scratchpad, m_size) == 0) {
|
||||||
m_flags.set(FLAG_LOCK, true);
|
m_flags.set(FLAG_LOCK, true);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user