diff options
author | Sean Chittenden <seanc@FreeBSD.org> | 2003-07-22 06:16:06 +0000 |
---|---|---|
committer | Sean Chittenden <seanc@FreeBSD.org> | 2003-07-22 06:16:06 +0000 |
commit | 97f08e64a9dc9336685b8f40d8848ac88fb3a3a8 (patch) | |
tree | 35c4bae8307dc10fbfff5f7b2c45be0bdeff6be9 /databases/memcached/files/patch-memcached.c | |
parent | Update to 4.11. (diff) |
Add memcached: a high-performance, distributed memory object caching
system, generic in nature, but intended for use in speeding up dynamic
web applications by alleviating database load.
Diffstat (limited to 'databases/memcached/files/patch-memcached.c')
-rw-r--r-- | databases/memcached/files/patch-memcached.c | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/databases/memcached/files/patch-memcached.c b/databases/memcached/files/patch-memcached.c new file mode 100644 index 000000000000..481e64fdbc26 --- /dev/null +++ b/databases/memcached/files/patch-memcached.c @@ -0,0 +1,57 @@ +--- memcached.c.orig Mon Jul 21 22:56:55 2003 ++++ memcached.c Mon Jul 21 22:58:46 2003 +@@ -34,7 +34,6 @@ + #include <errno.h> + #include <time.h> + #include <event.h> +-#include <malloc.h> + #include <assert.h> + + #include "memcached.h" +@@ -293,26 +292,6 @@ + return; + } + +- if (strcmp(command, "stats malloc") == 0) { +- char temp[512]; +- struct mallinfo info; +- char *pos = temp; +- +- info = mallinfo(); +- pos += sprintf(pos, "STAT arena_size %d\r\n", info.arena); +- pos += sprintf(pos, "STAT free_chunks %d\r\n", info.ordblks); +- pos += sprintf(pos, "STAT fastbin_blocks %d\r\n", info.smblks); +- pos += sprintf(pos, "STAT mmapped_regions %d\r\n", info.hblks); +- pos += sprintf(pos, "STAT mmapped_space %d\r\n", info.hblkhd); +- pos += sprintf(pos, "STAT max_total_alloc %d\r\n", info.usmblks); +- pos += sprintf(pos, "STAT fastbin_space %d\r\n", info.fsmblks); +- pos += sprintf(pos, "STAT total_alloc %d\r\n", info.uordblks); +- pos += sprintf(pos, "STAT total_free %d\r\n", info.fordblks); +- pos += sprintf(pos, "STAT releasable_space %d\r\nEND", info.keepcost); +- out_string(c, temp); +- return; +- } +- + if (strcmp(command, "stats maps") == 0) { + char *wbuf; + int wsize = 8192; /* should be enough */ +@@ -1089,7 +1068,6 @@ + printf("-d run as a daemon\n"); + printf("-m <num> max memory to use for items in megabytes, default is 64 MB\n"); + printf("-c <num> max simultaneous connections, default is 1024\n"); +- printf("-k lock down all paged memory\n"); + printf("-v verbose (print errors/warnings while in event loop)\n"); + printf("-h print this help and exit\n"); + printf("-i print memcached and libevent license\n"); +@@ -1236,11 +1214,6 @@ + fprintf(stderr, "failed to daemon() in order to daemonize\n"); + return 1; + } +- } +- +- /* lock paged memory if needed */ +- if (lock_memory) { +- mlockall(MCL_CURRENT | MCL_FUTURE); + } + + /* create the listening socket and bind it */ |