diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4.h | 9 | ||||
-rw-r--r-- | lib/lz4hc.c | 2 |
2 files changed, 7 insertions, 4 deletions
@@ -116,6 +116,10 @@ LZ4LIB_API const char* LZ4_versionString (void); /**< library version string; /*-************************************ * Tuning parameter **************************************/ +#define LZ4_MEMORY_USAGE_MIN 10 +#define LZ4_MEMORY_USAGE_DEFAULT 14 +#define LZ4_MEMORY_USAGE_MAX 20 + /*! * LZ4_MEMORY_USAGE : * Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; ) @@ -124,12 +128,9 @@ LZ4LIB_API const char* LZ4_versionString (void); /**< library version string; * Default value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */ #ifndef LZ4_MEMORY_USAGE -# define LZ4_MEMORY_USAGE 14 +# define LZ4_MEMORY_USAGE LZ4_MEMORY_USAGE_DEFAULT #endif -#define LZ4_MEMORY_USAGE_MIN 10 -#define LZ4_MEMORY_USAGE_MAX 20 - #if (LZ4_MEMORY_USAGE < LZ4_MEMORY_USAGE_MIN) # error "LZ4_MEMORY_USAGE is too small !" #endif diff --git a/lib/lz4hc.c b/lib/lz4hc.c index ee6fc41..99650a6 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -277,6 +277,8 @@ LZ4HC_InsertAndGetWiderMatch ( /* do nothing */ } else if (matchIndex >= dictLimit) { /* within current Prefix */ const BYTE* const matchPtr = base + matchIndex; + DEBUGLOG(2, "matchPtr = %p", matchPtr); + DEBUGLOG(2, "lowPrefixPtr = %p", lowPrefixPtr); assert(matchPtr >= lowPrefixPtr); assert(matchPtr < ip); assert(longest >= 1); |