diff options
author | dormando <dormando@rydia.net> | 2012-07-29 15:14:56 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2012-07-29 15:14:56 -0700 |
commit | 55ef5d374d1c6eaa1344cfd2576f9ab62306c1c2 (patch) | |
tree | 9f5f15713811afb19cbba851c2a95f3e64da7c30 | |
parent | ae76dc30ea63a1628f269e7ccd2877d6b6a816e6 (diff) | |
download | memcached-55ef5d374d1c6eaa1344cfd2576f9ab62306c1c2.tar.gz |
Error and exit if we don't have hugetlb support
I imagine host people on linux run this and then get both thumbs stuck up
their noses when weird bugs happen. Lets start by not lying to them.
-rw-r--r-- | memcached.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/memcached.c b/memcached.c index cd7abbb..fb32a87 100644 --- a/memcached.c +++ b/memcached.c @@ -4670,7 +4670,7 @@ static int enable_large_pages(void) { return ret; #else - return 0; + return -1; #endif } @@ -4891,6 +4891,9 @@ int main (int argc, char **argv) { case 'L' : if (enable_large_pages() == 0) { preallocate = true; + } else { + fprintf(stderr, "Cannot enable large pages on this system\n"); + return 1; } break; case 'C' : |