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-common.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-common.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 9 |
1 files changed, 6 insertions, 3 deletions
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"); |