summaryrefslogtreecommitdiff
path: root/src/common/compress.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-04-25 10:29:07 -0400
committerNick Mathewson <nickm@torproject.org>2017-04-25 10:29:07 -0400
commit4266ec766af8e210ac52f597699b44818960ee39 (patch)
tree902ce2bd58a59f78b8317e2277ecddbf233cdae3 /src/common/compress.c
parent91dd4a00f7d4891e24187a849933547128aeeb9f (diff)
downloadtor-4266ec766af8e210ac52f597699b44818960ee39.tar.gz
tor-4266ec766af8e210ac52f597699b44818960ee39.zip
Use atomic counters for compressor allocation.
Diffstat (limited to 'src/common/compress.c')
-rw-r--r--src/common/compress.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/compress.c b/src/common/compress.c
index 38b8184573..9332c0017d 100644
--- a/src/common/compress.c
+++ b/src/common/compress.c
@@ -375,3 +375,11 @@ tor_compress_state_size(const tor_compress_state_t *state)
return 0;
}
+/** Initialize all compression modules. */
+void
+tor_compress_init(void)
+{
+ tor_zlib_init();
+ tor_lzma_init();
+ tor_zstd_init();
+}