Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2016-04-10 15:25:17 +0300
committerHieu Hoang <hieuhoang@gmail.com>2016-04-10 15:25:17 +0300
commitba0a3d92f4ef6b14b76e859a43487adc8321d263 (patch)
tree88a9809fa3ec3faeddf85fe11358a74c847fe02f /util
parent2abb9a2779fd3f742f22a5a4ede213e03bdb64ad (diff)
compile error on old linux machines (Redhat 6.2)
Diffstat (limited to 'util')
-rw-r--r--util/mmap.cc2
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