diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-04-19 19:52:30 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-04-19 19:52:30 +0000 |
commit | 6ee5bef092f6abed7019a3e730e9f8f42264eea4 (patch) | |
tree | ffaea8ae39229e19d7974ed9acedf791c11e1d36 /src/common/mempool.c | |
parent | 7392464b8805950be47fddf160efef3d52df7444 (diff) | |
download | tor-6ee5bef092f6abed7019a3e730e9f8f42264eea4.tar.gz tor-6ee5bef092f6abed7019a3e730e9f8f42264eea4.zip |
r12458@catbus: nickm | 2007-04-19 15:52:23 -0400
Fix a bug in displaying memory pool usage. Also dump cell allocation, and track padded_cell_ts as they are allocated and freed, to make sure we are not leaking cells.
svn:r9992
Diffstat (limited to 'src/common/mempool.c')
-rw-r--r-- | src/common/mempool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/mempool.c b/src/common/mempool.c index 9f1fd394bd..dcdb27c3c7 100644 --- a/src/common/mempool.c +++ b/src/common/mempool.c @@ -517,7 +517,7 @@ mp_pool_log_status(mp_pool_t *pool, int severity) " bytes in %d partially full chunks", U64_PRINTF_ARG(bu), U64_PRINTF_ARG(ba), n_used); bytes_used += bu; - bytes_allocated += bu; + bytes_allocated += ba; bu = ba = 0; for (chunk = pool->full_chunks; chunk; chunk = chunk->next) { ++n_full; @@ -528,7 +528,7 @@ mp_pool_log_status(mp_pool_t *pool, int severity) " bytes in %d full chunks", U64_PRINTF_ARG(bu), U64_PRINTF_ARG(ba), n_full); bytes_used += bu; - bytes_allocated += bu; + bytes_allocated += ba; log_fn(severity, LD_MM, "Total: "U64_FORMAT"/"U64_FORMAT" bytes allocated " "for cell pools are full.", |