Changeset 693
- Timestamp:
- 02/11/08 04:38:23 (10 months ago)
- Files:
-
- trunk/server/memcached.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/server/memcached.c
r667 r693 2554 2554 "-M return error on memory exhausted (rather than removing items)\n" 2555 2555 "-c <num> max simultaneous connections, default is 1024\n" 2556 "-k lock down all paged memory\n" 2556 "-k lock down all paged memory. Note that there is a\n" 2557 " limit on how much memory you may lock. Trying to\n" 2558 " allocate more than that would fail, so be sure you\n" 2559 " set the limit correctly for the user you started\n" 2560 " the daemon with (not for -u <username> user;\n" 2561 " under sh this is done with 'ulimit -S -l NUM_KB').\n" 2557 2562 "-v verbose (print errors/warnings while in event loop)\n" 2558 2563 "-vv very verbose (also print client commands/reponses)\n" … … 2861 2866 } 2862 2867 2868 /* lock paged memory if needed */ 2869 if (lock_memory) { 2870 #ifdef HAVE_MLOCKALL 2871 int res = mlockall(MCL_CURRENT | MCL_FUTURE); 2872 if (res != 0) { 2873 fprintf(stderr, "warning: -k invalid, mlockall() failed: %s\n", 2874 strerror(errno)); 2875 } 2876 #else 2877 fprintf(stderr, "warning: -k invalid, mlockall() not supported on this platform. proceeding without.\n"); 2878 #endif 2879 } 2880 2863 2881 /* lose root privileges if we have them */ 2864 2882 if (getuid() == 0 || geteuid() == 0) { … … 2918 2936 } 2919 2937 memset(buckets, 0, sizeof(int) * MAX_BUCKETS); 2920 }2921 2922 /* lock paged memory if needed */2923 if (lock_memory) {2924 #ifdef HAVE_MLOCKALL2925 mlockall(MCL_CURRENT | MCL_FUTURE);2926 #else2927 fprintf(stderr, "warning: mlockall() not supported on this platform. proceeding without.\n");2928 #endif2929 2938 } 2930 2939
