summaryrefslogtreecommitdiffstats
path: root/lib/lz4.h
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2021-08-02 15:03:38 (GMT)
committerGitHub <noreply@github.com>2021-08-02 15:03:38 (GMT)
commit163db1675c0cb5c4e35266e1c1f73e119227ad30 (patch)
treea760c5af59566ee3728fa199bd01f2c0cfd42582 /lib/lz4.h
parent27fd77e6cd7ea81cba18c2593f08084415cf5d06 (diff)
parent0a0922067fdb684c2c79169cc9b02118b905a6b9 (diff)
downloadlz4-163db1675c0cb5c4e35266e1c1f73e119227ad30.zip
lz4-163db1675c0cb5c4e35266e1c1f73e119227ad30.tar.gz
lz4-163db1675c0cb5c4e35266e1c1f73e119227ad30.tar.bz2
Merge pull request #1013 from eloj/relax-lz4-memory-usage-tunable
Define LZ4_STREAMSIZE in terms of LZ4_MEMORY_USAGE.
Diffstat (limited to 'lib/lz4.h')
-rw-r--r--lib/lz4.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lz4.h b/lib/lz4.h
index 0b11eab..a520adc 100644
--- a/lib/lz4.h
+++ b/lib/lz4.h
@@ -620,7 +620,7 @@ typedef struct {
* note : only use this definition in association with static linking !
* this definition is not API/ABI safe, and may change in future versions.
*/
-#define LZ4_STREAMSIZE 16416 /* static size, for inter-version compatibility */
+#define LZ4_STREAMSIZE ((1UL << LZ4_MEMORY_USAGE) + 32) /* static size, for inter-version compatibility */
#define LZ4_STREAMSIZE_VOIDP (LZ4_STREAMSIZE / sizeof(void*))
union LZ4_stream_u {
void* table[LZ4_STREAMSIZE_VOIDP];