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/storage/bdb/src/bctx.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/storage/bdb/src/bctx.c')
-rw-r--r-- | xlators/storage/bdb/src/bctx.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xlators/storage/bdb/src/bctx.c b/xlators/storage/bdb/src/bctx.c index 361ce75fe9c..150d709a245 100644 --- a/xlators/storage/bdb/src/bctx.c +++ b/xlators/storage/bdb/src/bctx.c @@ -25,12 +25,12 @@ static void __destroy_bctx (bctx_t *bctx) { if (bctx->directory) - FREE (bctx->directory); + GF_FREE (bctx->directory); if (bctx->db_path) - FREE (bctx->db_path); + GF_FREE (bctx->db_path); - FREE (bctx); + GF_FREE (bctx); } static void @@ -236,16 +236,16 @@ __create_bctx (bctx_table_t *table, bctx_t *bctx = NULL; char *db_path = NULL; - bctx = CALLOC (1, sizeof (*bctx)); + bctx = GF_CALLOC (1, sizeof (*bctx), gf_bdb_mt_bctx_t); GF_VALIDATE_OR_GOTO ("bctx", bctx, out); bctx->table = table; - bctx->directory = strdup (path); + bctx->directory = gf_strdup (path); GF_VALIDATE_OR_GOTO ("bctx", bctx->directory, out); MAKE_REAL_PATH_TO_STORAGE_DB (db_path, BDB_THIS (table), path); - bctx->db_path = strdup (db_path); + bctx->db_path = gf_strdup (db_path); GF_VALIDATE_OR_GOTO ("bctx", bctx->directory, out); INIT_LIST_HEAD (&bctx->c_list); @@ -327,7 +327,7 @@ bctx_parent (bctx_table_t *table, GF_VALIDATE_OR_GOTO ("bctx", table, out); GF_VALIDATE_OR_GOTO ("bctx", path, out); - pathname = strdup (path); + pathname = gf_strdup (path); GF_VALIDATE_OR_GOTO ("bctx", pathname, out); directory = dirname (pathname); |