diff options
author | Yann Collet <cyan@fb.com> | 2018-09-18 00:05:17 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2018-09-18 00:05:17 (GMT) |
commit | cb2fb479efaf4bc74ea2c979646e711c94940b95 (patch) | |
tree | 286c7d0fad19707e990e69ef1dcf2796c8638dec | |
parent | 6103b4c9b4ebc29e3de0fcb08b3ccb64400abf5b (diff) | |
download | lz4-cb2fb479efaf4bc74ea2c979646e711c94940b95.zip lz4-cb2fb479efaf4bc74ea2c979646e711c94940b95.tar.gz lz4-cb2fb479efaf4bc74ea2c979646e711c94940b95.tar.bz2 |
increase lz4hc context size as constant for 128-bit systems
-rw-r--r-- | lib/lz4hc.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/lz4hc.h b/lib/lz4hc.h index 970fa39..ab796ae 100644 --- a/lib/lz4hc.h +++ b/lib/lz4hc.h @@ -123,12 +123,12 @@ LZ4LIB_API int LZ4_saveDictHC (LZ4_streamHC_t* streamHCPtr, char* safeBuffer, in */ -/*-************************************************************** +/*-****************************************************************** * PRIVATE DEFINITIONS : - * Do not use these definitions. - * They are exposed to allow static allocation of `LZ4_streamHC_t`. - * Using these definitions makes the code vulnerable to potential API break when upgrading LZ4 - ****************************************************************/ + * Do not use these definitions directly. + * They are merely exposed to allow static allocation of `LZ4_streamHC_t`. + * Using these definitions makes the code vulnerable to potential API/ABI break when upgrading LZ4. + ********************************************************************/ #define LZ4HC_DICTIONARY_LOGSIZE 16 #define LZ4HC_MAXD (1<<LZ4HC_DICTIONARY_LOGSIZE) #define LZ4HC_MAXD_MASK (LZ4HC_MAXD - 1) @@ -177,7 +177,7 @@ struct LZ4HC_CCtx_internal #endif -#define LZ4_STREAMHCSIZE (4*LZ4HC_HASHTABLESIZE + 2*LZ4HC_MAXD + 56) /* 262200 */ +#define LZ4_STREAMHCSIZE (4*LZ4HC_HASHTABLESIZE + 2*LZ4HC_MAXD + 56 + ((sizeof(void*)==16) ? 56 : 0) /* AS400*/ ) /* 262200 or 262256*/ #define LZ4_STREAMHCSIZE_SIZET (LZ4_STREAMHCSIZE / sizeof(size_t)) union LZ4_streamHC_u { size_t table[LZ4_STREAMHCSIZE_SIZET]; |