From 55ef5d374d1c6eaa1344cfd2576f9ab62306c1c2 Mon Sep 17 00:00:00 2001 From: dormando Date: Sun, 29 Jul 2012 15:14:56 -0700 Subject: 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. --- memcached.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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' : -- cgit v1.2.1