diff options
author | Jason Evans <jasone@canonware.com> | 2010-10-03 05:39:59 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2010-10-03 05:39:59 (GMT) |
commit | 9ce3bfd92d36d52d68ec6dd97e521a4c1fa2714f (patch) | |
tree | c486c7cccc215571fe4bb14e8b4d6875862b157b /jemalloc/src | |
parent | 588a32cd843ed6724b1b4d5317d027d39ae054af (diff) | |
download | jemalloc-9ce3bfd92d36d52d68ec6dd97e521a4c1fa2714f.zip jemalloc-9ce3bfd92d36d52d68ec6dd97e521a4c1fa2714f.tar.gz jemalloc-9ce3bfd92d36d52d68ec6dd97e521a4c1fa2714f.tar.bz2 |
Fix leak context count reporting.
Fix a bug in leak context count reporting that tended to cause the
number of contexts to be underreported. The reported number of leaked
objects and bytes were not affected by this bug.
Diffstat (limited to 'jemalloc/src')
-rw-r--r-- | jemalloc/src/prof.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jemalloc/src/prof.c b/jemalloc/src/prof.c index 5b66f97..783a83d 100644 --- a/jemalloc/src/prof.c +++ b/jemalloc/src/prof.c @@ -999,11 +999,11 @@ prof_ctx_sum(prof_ctx_t *ctx, prof_cnt_t *cnt_all, size_t *leak_nctx) ctx->cnt_summed.accumobjs += tcnt.accumobjs; ctx->cnt_summed.accumbytes += tcnt.accumbytes; } - - if (tcnt.curobjs != 0) - (*leak_nctx)++; } + if (ctx->cnt_summed.curobjs != 0) + (*leak_nctx)++; + /* Add to cnt_all. */ cnt_all->curobjs += ctx->cnt_summed.curobjs; cnt_all->curbytes += ctx->cnt_summed.curbytes; |