Merge pull request #673 from lz4/dev

minor update for v1.9.0
diff --git a/NEWS b/NEWS
index 6313142..2d85607 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,5 @@
 v1.9.0
-perf: large decompression speed improvement on x86/x64 (~+20%) by @djwatson
+perf: large decompression speed improvement on x86/x64 (up to +20%) by @djwatson
 api : changed : _destSize() compression variants are promoted to stable API
 api : new : LZ4_initStream(HC), replacing LZ4_resetStream(HC)
 api : changed : LZ4_resetStream(HC) as recommended reset function, for better performance on small data
@@ -8,7 +8,7 @@
 build: added meson build, by @lzutao
 build: new build macros : LZ4_DISTANCE_MAX, LZ4_FAST_DEC_LOOP
 install: MidnightBSD, by @laffer1
-install: Windows 10 msys2, by @vtorri
+install: msys2 on Windows 10, by @vtorri
 
 v1.8.3
 perf: minor decompression speed improvement (~+2%) with gcc
diff --git a/README.md b/README.md
index fd58573..73554cd 100644
--- a/README.md
+++ b/README.md
@@ -51,7 +51,7 @@
 
 The benchmark uses [lzbench], from @inikep
 compiled with GCC v8.2.0 on Linux 64-bits (Ubuntu 4.18.0-17).
-The reference system uses a Core i7-9700K CPU @ 4.9GHz.
+The reference system uses a Core i7-9700K CPU @ 4.9GHz (w/ turbo boost).
 Benchmark evaluates the compression of reference [Silesia Corpus]
 in single-thread mode.
 
@@ -61,14 +61,14 @@
 |  Compressor             | Ratio   | Compression | Decompression |
 |  ----------             | -----   | ----------- | ------------- |
 |  memcpy                 |  1.000  | 13700 MB/s  |  13700 MB/s   |
-|**LZ4 default (v1.9.0)** |**2.101**| **780 MB/s**| **4900 MB/s** |
+|**LZ4 default (v1.9.0)** |**2.101**| **780 MB/s**| **4970 MB/s** |
 |  LZO 2.09               |  2.108  |   670 MB/s  |    860 MB/s   |
 |  QuickLZ 1.5.0          |  2.238  |   575 MB/s  |    780 MB/s   |
 |  Snappy 1.1.4           |  2.091  |   565 MB/s  |   1950 MB/s   |
 | [Zstandard] 1.4.0 -1    |  2.883  |   515 MB/s  |   1380 MB/s   |
 |  LZF v3.6               |  2.073  |   415 MB/s  |    910 MB/s   |
 | [zlib] deflate 1.2.11 -1|  2.730  |   100 MB/s  |    415 MB/s   |
-|**LZ4 HC -9 (v1.8.2)**   |**2.721**|    39 MB/s  | **4850 MB/s** |
+|**LZ4 HC -9 (v1.8.2)**   |**2.721**|    41 MB/s  | **4900 MB/s** |
 | [zlib] deflate 1.2.11 -6|  3.099  |    36 MB/s  |    445 MB/s   |
 
 [zlib]: http://www.zlib.net/
diff --git a/lib/lz4frame.c b/lib/lz4frame.c
index 19efd0b..42124e9 100644
--- a/lib/lz4frame.c
+++ b/lib/lz4frame.c
@@ -72,15 +72,15 @@
  * by modifying below section.
  */
 #include <stdlib.h>   /* malloc, calloc, free */
-#define ALLOC(s)       malloc(s)
 #ifndef LZ4_SRC_INCLUDED   /* avoid redefinition when sources are coalesced */
-#  define ALLOC_AND_ZERO(s)  calloc(1,(s))
+#  define ALLOC(s)          malloc(s)
+#  define ALLOC_AND_ZERO(s) calloc(1,(s))
+#  define FREEMEM(p)        free(p)
 #endif
-#define FREEMEM(p)     free(p)
 
 #include <string.h>   /* memset, memcpy, memmove */
 #ifndef LZ4_SRC_INCLUDED  /* avoid redefinition when sources are coalesced */
-#  define MEM_INIT       memset
+#  define MEM_INIT(p,v,s)   memset((p),(v),(s))
 #endif
 
 
diff --git a/lib/lz4hc.c b/lib/lz4hc.c
index f6ed779..d5f6743 100644
--- a/lib/lz4hc.c
+++ b/lib/lz4hc.c
@@ -868,7 +868,7 @@
 #endif
     int const cSize = LZ4_compress_HC_extStateHC(statePtr, src, dst, srcSize, dstCapacity, compressionLevel);
 #if defined(LZ4HC_HEAPMODE) && LZ4HC_HEAPMODE==1
-    free(statePtr);
+    FREEMEM(statePtr);
 #endif
     return cSize;
 }
@@ -901,7 +901,7 @@
 {
     DEBUGLOG(4, "LZ4_freeStreamHC(%p)", LZ4_streamHCPtr);
     if (!LZ4_streamHCPtr) return 0;  /* support free on NULL */
-    free(LZ4_streamHCPtr);
+    FREEMEM(LZ4_streamHCPtr);
     return 0;
 }