aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakayuki Matsuoka <t-mat@users.noreply.github.com>2022-08-11 01:09:53 +0900
committerTakayuki Matsuoka <t-mat@users.noreply.github.com>2022-08-11 01:09:53 +0900
commitd0928a7f2071b9f06a32780d79c0c5a0b204c360 (patch)
tree38c60a570a71e8a3ea1d8871d6ad4952a54206b9
parentd0460e4aaab84d50f2db0cb303ea0f6fe84745ce (diff)
downloadlz4-d0928a7f2071b9f06a32780d79c0c5a0b204c360.tar.gz
Add short document of LZ4_FREESTANDING to lz4.h
-rw-r--r--lib/lz4.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/lz4.h b/lib/lz4.h
index 01ab4459..9d93eb1f 100644
--- a/lib/lz4.h
+++ b/lib/lz4.h
@@ -97,10 +97,17 @@ extern "C" {
# define LZ4LIB_API LZ4LIB_VISIBILITY
#endif
-/*!
- * LZ4_FREESTANDING :
- * Enable "freestanding mode" that is suitable for typical freestanding environment.
- * In freestanding mode, some LZ4/HC functions which use heap are disabled.
+/*! LZ4_FREESTANDING :
+ * When this macro is set to 1, it enables "freestanding mode" that is
+ * suitable for typical freestanding environment which doesn't support
+ * standard C library.
+ *
+ * - LZ4_FREESTANDING is a compile-time switch.
+ * - It requires the following macros to be defined:
+ * LZ4_memcpy, LZ4_memmove, LZ4_memset.
+ * - It only enables LZ4/HC functions which don't use heap.
+ * All LZ4F_* functions are not supported.
+ * - See tests/freestanding.c to check its basic setup.
*/
#if defined(LZ4_FREESTANDING) && (LZ4_FREESTANDING == 1)
# define LZ4_HEAPMODE 0