diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2016-04-12 22:04:51 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2016-04-12 22:04:51 +0300 |
commit | 1ff1d04f7624fd1b2fbf6df43ce14bf3bfb2d7d6 (patch) | |
tree | 04d16f1cb6a00e4afc24fe0f3c9f67904518d762 /util | |
parent | b48d329898186a8a26bc6bdc9e5ec8c7a2998817 (diff) | |
parent | 7b205b0c8a4b0f10c5d6bea7019bf468ab4046be (diff) |
Merge ../mosesdecoder into perf_moses2
Diffstat (limited to 'util')
-rw-r--r-- | util/mmap.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/mmap.cc b/util/mmap.cc index d89f3f600..cdf92c731 100644 --- a/util/mmap.cc +++ b/util/mmap.cc @@ -173,8 +173,10 @@ bool TryHuge(std::size_t size, uint8_t alignment_bits, bool populate, util::scop // Second try: manually configured hugetlb pages exist, but kernel too old to // pick size or not available. This might pick the wrong size huge pages, // but the sysadmin must have made them available in the first place. +#ifdef MAP_HUGETLB if (AnonymousMap(size, MAP_HUGETLB, populate, to)) return true; +#endif // Third try: align to a multiple of the huge page size by overallocating. // I feel bad about doing this, but it's also how posix_memalign is |