diff options
author | Yann Collet <cyan@fb.com> | 2022-09-08 05:50:28 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2022-09-08 05:50:28 (GMT) |
commit | cedf9cd57f142327cb3b92a574125f46975d7a48 (patch) | |
tree | 9885b7ccab26b623deca0889324ed513d4f824d2 /Makefile | |
parent | 4de3e98ad206f6afc85bbb4268f6c3a64fc2d487 (diff) | |
download | lz4-cedf9cd57f142327cb3b92a574125f46975d7a48.zip lz4-cedf9cd57f142327cb3b92a574125f46975d7a48.tar.gz lz4-cedf9cd57f142327cb3b92a574125f46975d7a48.tar.bz2 |
allocation optimization for lz4frame compression
as noted by @yixiutt, the temporary buffer inside lz4frame compression
is being invalidated at end of compression,
forcing it to be re-allocated at next compression job.
This shouldn't be necessary.
This change was introduced in #236, as a way to fix #232,
but neither the issue is explained, nor why the patch fixes it.
This patch revert to previous behavior,
where temporary buffer is kept between compression calls.
This results in a net reduction of allocation workload.
Additionally, the temporary buffer should only need malloc(),
not calloc(), thus saving initialization.
This diff implements both changes.
Long fuzzer tests will be run to ensure that no sanitizer warning get triggered.
Additionally :
fixed a minor ubsan warning in LZ4F_decompress().
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions