瀏覽代碼

Merge pull request #4109 from ghalliday/issue8973

HPCC-8973 Fix build break with huge page support

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 年之前
父節點
當前提交
345b4728d2
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      roxie/roxiemem/roxiemem.cpp

+ 6 - 0
roxie/roxiemem/roxiemem.cpp

@@ -147,6 +147,8 @@ static void initializeHeap(bool allowHugePages, unsigned pages, unsigned largeBl
     }
 #else
     heapUseHugePages = false;
+
+#ifdef MAP_HUGETLB
     if (allowHugePages)
     {
         heapBase = (char *)mmap(NULL, memsize, (PROT_READ | PROT_WRITE), (MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB), 0, 0);
@@ -161,6 +163,10 @@ static void initializeHeap(bool allowHugePages, unsigned pages, unsigned largeBl
             DBGLOG("Huge Pages requested but unavailable");
         }
     }
+#else
+    if (allowHugePages)
+        DBGLOG("Huge Pages requested but not supported by the system");
+#endif
 
     if (!heapBase)
     {