mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-27 06:20:51 -05:00
Memory allocation refactoring.
This commit is contained in:
@@ -53,16 +53,6 @@ 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user