diff options
author | Vijay Bellur <vijay@gluster.com> | 2010-04-22 13:33:09 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-04-23 06:32:52 -0700 |
commit | 582de0677da4be19fc6f873625c58c45d069ab1c (patch) | |
tree | f10cb3e26e1f92f6ea91034e6f7bb925790dd9bc /xlators/cluster/dht/src/dht-helper.c | |
parent | 72baa17282f5cf749fa743fd601c7b728ece4fa2 (diff) |
Memory accounting changes
Memory accounting Changes. Thanks to Vinayak Hegde and Csaba Henk for their
contributions.
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 329 (Replacing memory allocation functions with mem-type functions)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329
Diffstat (limited to 'xlators/cluster/dht/src/dht-helper.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-helper.c | 9 |
1 files changed, 5 insertions, 4 deletions
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, |