From eb8a9aae19755bc21afe2d8ed4893b788c4e84ff Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 1 Mar 2012 17:25:12 +0530 Subject: core: dict allocations through mem-pool Change-Id: I7401639060957d437808779745a1e46c3f9f4585 Signed-off-by: Amar Tumballi BUG: 798503 Reviewed-on: http://review.gluster.com/2851 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- cli/src/cli.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'cli/src/cli.c') diff --git a/cli/src/cli.c b/cli/src/cli.c index f20ea1f17..c638dc827 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -179,6 +179,18 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx) if (!ctx->stub_mem_pool) return -1; + ctx->dict_pool = mem_pool_new (dict_t, 32); + if (!ctx->dict_pool) + return -1; + + ctx->dict_pair_pool = mem_pool_new (data_pair_t, 512); + if (!ctx->dict_pair_pool) + return -1; + + ctx->dict_data_pool = mem_pool_new (data_t, 512); + if (!ctx->dict_data_pool) + return -1; + INIT_LIST_HEAD (&pool->all_frames); LOCK_INIT (&pool->lock); ctx->pool = pool; -- cgit