Approximate memory usage needed for the LZMA backend.
commit341824687a619f3203d2378e82785823922a6143
authorAlexander Færøy <ahf@torproject.org>
Wed, 26 Apr 2017 01:03:29 +0000 (26 03:03 +0200)
committerAlexander Færøy <ahf@torproject.org>
Wed, 26 Apr 2017 17:54:18 +0000 (26 19:54 +0200)
treed579cf7a9d069dd3b24271eca865862f66ab5a57
parent08d86e84086f7caf9f21228c8ed02d7f131168bb
Approximate memory usage needed for the LZMA backend.

This patch adds support for measuring the approximated memory usage by
the individual `tor_lzma_compress_state_t` object instances.

The LZMA library provides the functions `lzma_easy_encoder_memusage()`
and `lzma_easy_decoder_memusage()` which is used to find the estimated
usage in bytes.

See: https://bugs.torproject.org/22066
src/common/compress_lzma.c