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-common.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'xlators/cluster/dht/src/dht-common.c') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 1ee723d9cfb..a8a15920518 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -3557,7 +3557,8 @@ dht_rmdir_is_subvol_empty (call_frame_t *frame, xlator_t *this, goto err; } - lookup_local = CALLOC (sizeof (*local), 1); + lookup_local = GF_CALLOC (sizeof (*local), 1, + gf_dht_mt_dht_local_t); if (!lookup_local) { gf_log (this->name, GF_LOG_ERROR, "Out of Memory"); @@ -4235,7 +4236,8 @@ dht_init_subvolumes (xlator_t *this, dht_conf_t *conf) for (subvols = this->children; subvols; subvols = subvols->next) cnt++; - conf->subvolumes = CALLOC (cnt, sizeof (xlator_t *)); + conf->subvolumes = GF_CALLOC (cnt, sizeof (xlator_t *), + gf_dht_mt_xlator_t); if (!conf->subvolumes) { gf_log (this->name, GF_LOG_ERROR, "Out of memory"); @@ -4247,7 +4249,8 @@ dht_init_subvolumes (xlator_t *this, dht_conf_t *conf) for (subvols = this->children; subvols; subvols = subvols->next) conf->subvolumes[cnt++] = subvols->xlator; - conf->subvolume_status = CALLOC (cnt, sizeof (char)); + conf->subvolume_status = GF_CALLOC (cnt, sizeof (char), + gf_dht_mt_char); if (!conf->subvolume_status) { gf_log (this->name, GF_LOG_ERROR, "Out of memory"); -- cgit