arena spacing

This commit is contained in:
Dallas Marlow 2014-05-11 10:22:28 -04:00
parent 030db3d17e
commit 557fbc9b3b

View File

@ -83,9 +83,8 @@ char* Arena::AllocateAligned(size_t bytes, size_t huge_page_tlb_size,
size_t reserved_size = size_t reserved_size =
((bytes - 1U) / huge_page_tlb_size + 1U) * huge_page_tlb_size; ((bytes - 1U) / huge_page_tlb_size + 1U) * huge_page_tlb_size;
assert(reserved_size >= bytes); assert(reserved_size >= bytes);
void* addr = mmap(nullptr, reserved_size, (PROT_READ | PROT_WRITE), void* addr = mmap(nullptr, reserved_size, (PROT_READ | PROT_WRITE),
(MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB), 0, 0); (MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB), 0, 0);
if (addr == MAP_FAILED) { if (addr == MAP_FAILED) {
Warn(logger, "AllocateAligned fail to allocate huge TLB pages: %s", Warn(logger, "AllocateAligned fail to allocate huge TLB pages: %s",