diff options
author | Alexander Færøy <ahf@torproject.org> | 2017-04-20 15:33:13 +0200 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-25 08:10:09 -0400 |
commit | 04682d302aeeb0c2a0d9859bc0c1feee38daf16a (patch) | |
tree | 1c47cbb8c7d1bd711951e73ec9ddc61d914db975 /src/or/relay.c | |
parent | be4dc546345831773c2e16fa3dc12749d925aa25 (diff) | |
download | tor-04682d302aeeb0c2a0d9859bc0c1feee38daf16a.tar.gz tor-04682d302aeeb0c2a0d9859bc0c1feee38daf16a.zip |
Add `tor_compress_get_total_allocation()` function.
This patch adds the `tor_compress_get_total_allocation()` which returns
an approximate number of bytes currently in use by all the different
compression backends.
See: https://bugs.torproject.org/21662
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 8a98c50372..8524080939 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -54,7 +54,7 @@ #include "circuitbuild.h" #include "circuitlist.h" #include "circuituse.h" -#include "compress_zlib.h" +#include "compress.h" #include "config.h" #include "connection.h" #include "connection_edge.h" @@ -2454,7 +2454,7 @@ cell_queues_check_size(void) { size_t alloc = cell_queues_get_total_allocation(); alloc += buf_get_total_allocation(); - alloc += tor_zlib_get_total_allocation(); + alloc += tor_compress_get_total_allocation(); const size_t rend_cache_total = rend_cache_get_total_allocation(); alloc += rend_cache_total; if (alloc >= get_options()->MaxMemInQueues_low_threshold) { |