diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2022-08-10 17:59:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-10 17:59:36 (GMT) |
commit | dee9f95fd9b65ee25858e8e602e3084cf4870b41 (patch) | |
tree | 26192f41ce914e7815d6c0849beae29acda6e29b /lib/lz4.c | |
parent | 70b1201c5b185e2e6f82da4ceffcd5c8ad9b56a3 (diff) | |
parent | e1276aebe2736af82f0022196a62ae7a9050a0c4 (diff) | |
download | lz4-dee9f95fd9b65ee25858e8e602e3084cf4870b41.zip lz4-dee9f95fd9b65ee25858e8e602e3084cf4870b41.tar.gz lz4-dee9f95fd9b65ee25858e8e602e3084cf4870b41.tar.bz2 |
Merge pull request #1129 from t-mat/disable-memory-alloc-add-doc
Add document for LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION
Diffstat (limited to 'lib/lz4.c')
-rw-r--r-- | lib/lz4.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -188,6 +188,17 @@ /*-************************************ * Memory routines **************************************/ + +/*! LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION : + * Disable relatively high-level LZ4/HC functions that use dynamic memory + * allocation functions (malloc(), calloc(), free()). + * + * Note that this is a compile-time switch. And since it disables + * 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. + */ #if defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) # define ALLOC(s) lz4_error_memory_allocation_is_disabled # define ALLOC_AND_ZERO(s) lz4_error_memory_allocation_is_disabled |