From 72bf461fc1d6614b78fdd0cdebb858ca13e78f90 Mon Sep 17 00:00:00 2001 From: kanoi Date: Mon, 4 Aug 2014 12:52:05 +1000 Subject: [PATCH] ckdb - correct stats tree ram calculation --- src/ckdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ckdb.c b/src/ckdb.c index df17d32b..9c7f156c 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -6388,7 +6388,7 @@ static char *cmd_stats(char *cmd, char *id, __maybe_unused tv_t *now, klist = _obj ## _free; \ ram = sizeof(K_LIST) + _stores * sizeof(K_STORE) + \ klist->allocate * klist->item_mem_count * klist->siz + \ - sizeof(K_TREE) * klist->count * _trees; \ + sizeof(K_TREE) * (klist->total - klist->count) * _trees; \ snprintf(tmp, sizeof(tmp), \ "%cname%d=" #_obj "%callocated%d=%d%cstore%d=%d" \ "%ctrees%d=%d%cram%d=%"PRIu64, \