summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakayuki Matsuoka <t-mat@users.noreply.github.com>2022-08-10 16:09:53 (GMT)
committerTakayuki Matsuoka <t-mat@users.noreply.github.com>2022-08-10 16:09:53 (GMT)
commitd0928a7f2071b9f06a32780d79c0c5a0b204c360 (patch)
tree38c60a570a71e8a3ea1d8871d6ad4952a54206b9
parentd0460e4aaab84d50f2db0cb303ea0f6fe84745ce (diff)
downloadlz4-d0928a7f2071b9f06a32780d79c0c5a0b204c360.zip
lz4-d0928a7f2071b9f06a32780d79c0c5a0b204c360.tar.gz
lz4-d0928a7f2071b9f06a32780d79c0c5a0b204c360.tar.bz2
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 01ab445..9d93eb1 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