Memory allocation refactoring.

This commit is contained in:
XMRig 2019-12-08 23:17:39 +07:00
parent 8a13e0febd
commit d32df84ca5
No known key found for this signature in database
GPG key ID: 446A53638BE94409
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);
}