summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-03-01 17:25:12 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-14 22:15:25 -0700
commiteb8a9aae19755bc21afe2d8ed4893b788c4e84ff (patch)
tree4bf00b663ea400f583728e4dc9e9c64cbda4c1f8 /glusterfsd
parentd05708d7976a8340ae7647fd26f38f22f1863b6a (diff)
downloadglusterfs-eb8a9aae19755bc21afe2d8ed4893b788c4e84ff.tar.gz
glusterfs-eb8a9aae19755bc21afe2d8ed4893b788c4e84ff.tar.xz
glusterfs-eb8a9aae19755bc21afe2d8ed4893b788c4e84ff.zip
core: dict allocations through mem-pool
Change-Id: I7401639060957d437808779745a1e46c3f9f4585 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 798503 Reviewed-on: http://review.gluster.com/2851 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 7d322b0dd7..57b3f0160b 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -1031,6 +1031,18 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx)
return -1;
}
+ ctx->dict_pool = mem_pool_new (dict_t, 1024);
+ if (!ctx->dict_pool)
+ return -1;
+
+ ctx->dict_pair_pool = mem_pool_new (data_pair_t, 16 * GF_UNIT_KB);
+ if (!ctx->dict_pair_pool)
+ return -1;
+
+ ctx->dict_data_pool = mem_pool_new (data_t, 8 * GF_UNIT_KB);
+ if (!ctx->dict_data_pool)
+ return -1;
+
INIT_LIST_HEAD (&pool->all_frames);
LOCK_INIT (&pool->lock);
ctx->pool = pool;