summaryrefslogtreecommitdiff
path: root/src/common/compress.h
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2017-04-20 15:33:13 +0200
committerNick Mathewson <nickm@torproject.org>2017-04-25 08:10:09 -0400
commit04682d302aeeb0c2a0d9859bc0c1feee38daf16a (patch)
tree1c47cbb8c7d1bd711951e73ec9ddc61d914db975 /src/common/compress.h
parentbe4dc546345831773c2e16fa3dc12749d925aa25 (diff)
downloadtor-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/common/compress.h')
-rw-r--r--src/common/compress.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/compress.h b/src/common/compress.h
index 59e7a79061..1fd4325b7e 100644
--- a/src/common/compress.h
+++ b/src/common/compress.h
@@ -51,6 +51,9 @@ tor_compress_memory_level(compression_level_t level);
int
tor_compress_is_compression_bomb(size_t size_in, size_t size_out);
+size_t
+tor_compress_get_total_allocation(void);
+
/** Return values from tor_compress_process; see that function's documentation
* for details. */
typedef enum {