mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-25 05:40:39 -05:00
Added "memory-pool" option.
This commit is contained in:
@@ -110,7 +110,7 @@ void xmrig::VirtualMemory::destroy()
|
||||
}
|
||||
|
||||
|
||||
void xmrig::VirtualMemory::init(bool hugePages, int poolSize)
|
||||
void xmrig::VirtualMemory::init(size_t poolSize, bool hugePages)
|
||||
{
|
||||
if (!pool) {
|
||||
osInit();
|
||||
@@ -118,10 +118,10 @@ void xmrig::VirtualMemory::init(bool hugePages, int poolSize)
|
||||
|
||||
# ifdef XMRIG_FEATURE_HWLOC
|
||||
if (Cpu::info()->nodes() > 1) {
|
||||
pool = new NUMAMemoryPool(align(poolSize < 0 ? Cpu::info()->threads() : poolSize, Cpu::info()->nodes()), hugePages);
|
||||
pool = new NUMAMemoryPool(align(poolSize, Cpu::info()->nodes()), hugePages);
|
||||
} else
|
||||
# endif
|
||||
{
|
||||
pool = new MemoryPool(poolSize < 0 ? Cpu::info()->threads() : poolSize, hugePages);
|
||||
pool = new MemoryPool(poolSize, hugePages);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
static void destroy();
|
||||
static void flushInstructionCache(void *p, size_t size);
|
||||
static void freeLargePagesMemory(void *p, size_t size);
|
||||
static void init(bool hugePages, int poolSize);
|
||||
static void init(size_t poolSize, bool hugePages);
|
||||
static void protectExecutableMemory(void *p, size_t size);
|
||||
static void unprotectExecutableMemory(void *p, size_t size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user