aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2022-08-11 11:51:43 -0700
committerGitHub <noreply@github.com>2022-08-11 11:51:43 -0700
commite691e827280453e67fdf57421bb58d6e1faf734d (patch)
tree8ff793ac343e2efec6a07c0350a4865103a69068
parentdee9f95fd9b65ee25858e8e602e3084cf4870b41 (diff)
parentb41ee9935d4fdd8051ec89f0a14682c6821aa6ae (diff)
downloadlz4-e691e827280453e67fdf57421bb58d6e1faf734d.tar.gz
Merge pull request #1131 from t-mat/doc-freestanding
Doc freestanding
-rw-r--r--lib/README.md12
-rw-r--r--lib/lz4.c7
2 files changed, 18 insertions, 1 deletions
diff --git a/lib/README.md b/lib/README.md
index 244d65ce..c9916a98 100644
--- a/lib/README.md
+++ b/lib/README.md
@@ -104,6 +104,18 @@ The following build macro can be selected to adjust source code behavior at comp
passed as argument to become a compression state is suitably aligned.
This test can be disabled if it proves flaky, by setting this value to 0.
+- `LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION` : some LZ4/HC (level 1 and 2) public
+ functions internally invoke dynamic memory allocation functions of the C standard library.
+ By defining this build macro, these LZ4/HC functions are disabled to ensure to remove
+ dependency to the standard library.
+ See also the description of this macro in lib/lz4.c.
+
+- `LZ4_FREESTANDING` : by setting this build macro to 1, LZ4/HC (level 1 and 2) removes
+ dependencies on the C standard library, including memmove, memcpy, and memset.
+ This build macro is designed to help use LZ4/HC in restricted environments
+ (embedded, bootloader, etc).
+ See also the description of this macro in lib/lz4.h.
+
#### Amalgamation
diff --git a/lib/lz4.c b/lib/lz4.c
index e37adb14..2a31735a 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -197,7 +197,12 @@
* public/stable LZ4 v1 API functions, we don't recommend using this
* symbol to generate a library for distribution.
*
- * The following functions are removed when this symbol is defined.
+ * The following public functions are removed when this symbol is defined.
+ * - lz4 : LZ4_createStream, LZ4_freeStream,
+ * LZ4_createStreamDecode, LZ4_freeStreamDecode, LZ4_create (deprecated)
+ * - lz4hc : LZ4_createStreamHC, LZ4_freeStreamHC,
+ * LZ4_createHC (deprecated), LZ4_freeHC (deprecated)
+ * - lz4frame, lz4file : All LZ4F_* functions
*/
#if defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
# define ALLOC(s) lz4_error_memory_allocation_is_disabled