diff options
author | Toru Maesaka <dev@torum.net> | 2008-09-11 17:08:46 +0900 |
---|---|---|
committer | Dustin Sallings <dustin@spy.net> | 2009-01-03 00:09:10 -0800 |
commit | 199216ae3af9ab8f38e35dcfe39ffbae9248c157 (patch) | |
tree | de7d6511784feacf8f4b56914363ae296d0e5d00 /slabs.c | |
parent | 294c32d784a14eb63bc9a7c87e2fd14a89bcb111 (diff) | |
download | memcached-199216ae3af9ab8f38e35dcfe39ffbae9248c157.tar.gz |
Support of stats reset subcommand via the binary protocol.
Diffstat (limited to 'slabs.c')
-rw-r--r-- | slabs.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -373,7 +373,7 @@ char *get_stats(const bool bin_prot, const char *stat_type, #ifdef HAVE_MALLOC_H #ifdef HAVE_STRUCT_MALLINFO else if (strcmp(stat_type, "malloc") == 0) { - char *buf = malloc(1024); + buf = malloc(1024); char *pos = buf; struct mallinfo info; uint32_t linelen = 0; @@ -457,7 +457,8 @@ char *get_stats(const bool bin_prot, const char *stat_type, 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); + pos += sprintf(pos, "STAT releasable_space %d\r\nEND\r\n", + info.keepcost); *buflen = pos - buf; } |