From 582de0677da4be19fc6f873625c58c45d069ab1c Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Thu, 22 Apr 2010 13:33:09 +0000 Subject: Memory accounting changes Memory accounting Changes. Thanks to Vinayak Hegde and Csaba Henk for their contributions. Signed-off-by: Vijay Bellur 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 --- xlators/cluster/dht/src/dht-helper.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'xlators/cluster/dht/src/dht-helper.c') diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index f2e1a182a72..767be38b41c 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -148,7 +148,7 @@ dht_local_wipe (xlator_t *this, dht_local_t *local) local->selfheal.layout = NULL; } - FREE (local); + GF_FREE (local); } @@ -158,7 +158,8 @@ dht_local_init (call_frame_t *frame) dht_local_t *local = NULL; /* TODO: use mem-pool */ - local = CALLOC (1, sizeof (*local)); + local = GF_CALLOC (1, sizeof (*local), + gf_dht_mt_dht_local_t); if (!local) return NULL; @@ -408,9 +409,9 @@ dht_build_child_loc (xlator_t *this, loc_t *child, loc_t *parent, char *name) } if (strcmp (parent->path, "/") == 0) - asprintf ((char **)&child->path, "/%s", name); + gf_asprintf ((char **)&child->path, "/%s", name); else - asprintf ((char **)&child->path, "%s/%s", parent->path, name); + gf_asprintf ((char **)&child->path, "%s/%s", parent->path, name); if (!child->path) { gf_log (this->name, GF_LOG_ERROR, -- cgit