Added 1GB hugepages support for Linux
This commit is contained in:
parent
caa2da8bb3
commit
1fbbae1e4a
28 changed files with 156 additions and 50 deletions
|
@ -53,6 +53,16 @@ void* allocLargePagesMemory(std::size_t bytes) {
|
|||
}
|
||||
|
||||
|
||||
void* allocOneGbPagesMemory(std::size_t bytes) {
|
||||
void* mem = xmrig::VirtualMemory::allocateOneGbPagesMemory(bytes);
|
||||
if (mem == nullptr) {
|
||||
throw std::runtime_error("Failed to allocate 1GB pages memory");
|
||||
}
|
||||
|
||||
return mem;
|
||||
}
|
||||
|
||||
|
||||
void freePagedMemory(void* ptr, std::size_t bytes) {
|
||||
xmrig::VirtualMemory::freeLargePagesMemory(ptr, bytes);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue