Memory allocation refactoring.

This commit is contained in:
XMRig
2019-12-08 23:17:39 +07:00
parent 5a25a879e8
commit 280618a9eb
32 changed files with 516 additions and 272 deletions

View File

@@ -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);
}