Skip to content

Commit

Permalink
Missing ifdef / Matt Post
Browse files Browse the repository at this point in the history
  • Loading branch information
kpu committed Sep 30, 2015
1 parent ea8e19f commit ebf31f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions util/mmap.cc
Expand Up @@ -206,7 +206,9 @@ bool TryHuge(std::size_t size, uint8_t alignment_bits, bool populate, util::scop
UnmapOrThrow(static_cast<uint8_t*>(larger.get()) + size_up, larger.size() - size_up);
larger.reset(larger.steal(), size_up);
}
#ifdef MADV_HUGEPAGE
madvise(larger.get(), size_up, MADV_HUGEPAGE);
#endif
to.reset(larger.steal(), size, scoped_memory::MMAP_ROUND_UP_ALLOCATED);
return true;
}
Expand Down

0 comments on commit ebf31f3

Please sign in to comment.