aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morecore.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/morecore.c b/morecore.c
index 0574a7c..39322a6 100644
--- a/morecore.c
+++ b/morecore.c
@@ -26,6 +26,7 @@
#include <sys/mman.h>
#include <errno.h>
#include <dlfcn.h>
+#include <string.h>
#include "hugetlbfs.h"
@@ -134,6 +135,11 @@ static void __attribute__((constructor)) setup_morecore(void)
env = getenv("HUGETLB_MORECORE");
if (! env)
return;
+ if (strcasecmp(env, "no") == 0) {
+ DEBUG("HUGETLB_MORECORE=%s, not setting up morecore\n",
+ env);
+ return;
+ }
blocksize = gethugepagesize();
if (! blocksize) {