From 305025fbf823007fe715ea1ae0bbe44102221663 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Thu, 5 Aug 2010 03:58:37 +0000 Subject: Implement mem pool for frame and stack Ran posix compliance test and sanity test Signed-off-by: shishir gowda Signed-off-by: Anand V. Avati BUG: 329 (Replacing memory allocation functions with mem-type functions) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329 --- cli/src/cli.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cli/src') diff --git a/cli/src/cli.c b/cli/src/cli.c index efa41eb8507..ad70696e258 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -208,6 +208,19 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx) cli_mt_call_pool_t); if (!pool) return -1; + + /* frame_mem_pool size 112 * 16k */ + pool->frame_mem_pool = mem_pool_new (call_frame_t, 16384); + + if (!pool->frame_mem_pool) + return -1; + + /* stack_mem_pool size 256 * 8k */ + pool->stack_mem_pool = mem_pool_new (call_stack_t, 8192); + + if (!pool->stack_mem_pool) + return -1; + INIT_LIST_HEAD (&pool->all_frames); LOCK_INIT (&pool->lock); ctx->pool = pool; -- cgit