Skip to content

Commit

Permalink
Error and exit if we don't have hugetlb support
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dormando committed Jul 29, 2012
1 parent ae76dc3 commit 55ef5d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion memcached.c
Original file line number Diff line number Diff line change
Expand Up @@ -4670,7 +4670,7 @@ static int enable_large_pages(void) {

return ret;
#else
return 0;
return -1;
#endif
}

Expand Down Expand Up @@ -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' :
Expand Down

0 comments on commit 55ef5d3

Please sign in to comment.