diff options
author | Anand Avati <avati@redhat.com> | 2014-03-29 06:59:39 -0700 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2014-05-05 17:28:29 -0700 |
commit | 7fba3a88f1ced610eca0c23516a1e720d75160cd (patch) | |
tree | 245bc7bda320b7894a0f7806087175faaf1bbce7 /libglusterfs/src/ctx.c | |
parent | 71ad38b3f86bdb0c4e9120b58ff451a6711ead9d (diff) |
mem-accounting: enable memory accounting by default
memory accounting are constant time operations which
involve a few pointer dereferences and integer increments
(no loops or searches etc.)
benefits of having memory usage info outweigh the minor
accounting overheads
Change-Id: If9bc6db5ffd0e00f0fd64b2f6eed094bf3543996
BUG: 1089216
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/7543
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Diffstat (limited to 'libglusterfs/src/ctx.c')
-rw-r--r-- | libglusterfs/src/ctx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libglusterfs/src/ctx.c b/libglusterfs/src/ctx.c index 0082601d466..f273451a74b 100644 --- a/libglusterfs/src/ctx.c +++ b/libglusterfs/src/ctx.c @@ -31,6 +31,8 @@ glusterfs_ctx_new () goto out; } + ctx->mem_acct_enable = 1; + INIT_LIST_HEAD (&ctx->graphs); INIT_LIST_HEAD (&ctx->mempool_list); |