diff options
author | aglitke <aglitke@aglitke.localdomain> | 2006-09-13 13:53:17 -0500 |
---|---|---|
committer | aglitke <aglitke@aglitke.localdomain> | 2006-09-13 13:53:17 -0500 |
commit | f9f27139e54ad7a7a0e09a3ef5cb6dcebe16c002 (patch) | |
tree | 2e2e214f69e0a808c40f0d760d1e222b9adf72a5 | |
parent | d109349663491a6be7e6741837e8d520e59d2bb4 (diff) | |
download | libhugetlbfs-f9f27139e54ad7a7a0e09a3ef5cb6dcebe16c002.tar.gz |
morecore: Fixup HUGETLB_MORECORE semanticsdev-20060913-1
Currently, morecore is enabled, if HUGETLB_MORECORE is set at all in the
environment, even if its value is "no". That is counterintuitive, as
none of the other environment variables work that way. Make
HUGETLB_MORECORE act like HUGETLB_ELFMAP.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
-rw-r--r-- | morecore.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) { |