mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 10:01:06 +00:00
Fixed compilation on systems without 1GB pages support
This commit is contained in:
parent
aa3dc75434
commit
e3422979d1
1 changed files with 2 additions and 0 deletions
|
@ -82,6 +82,8 @@ void *xmrig::VirtualMemory::allocateOneGbPagesMemory(size_t size)
|
|||
constexpr int flag_1gb = MAP_HUGE_1GB;
|
||||
# elif defined(MAP_HUGE_SHIFT)
|
||||
constexpr int flag_1gb = (30 << MAP_HUGE_SHIFT);
|
||||
# else
|
||||
constexpr int flag_1gb = 0;
|
||||
# endif
|
||||
|
||||
void *mem = mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_POPULATE | flag_1gb, 0, 0);
|
||||
|
|
Loading…
Reference in a new issue