14#define ZSTD_DEPS_NEED_MALLOC
18#define ZSTD_STATIC_LINKING_ONLY
21#ifndef ZSTD_ALLOCATIONS_H
22#define ZSTD_ALLOCATIONS_H
28 if (customMem.customAlloc)
29 return customMem.customAlloc(customMem.opaque, size);
30 return ZSTD_malloc(size);
35 if (customMem.customAlloc) {
38 void*
const ptr = customMem.customAlloc(customMem.opaque, size);
42 return ZSTD_calloc(1, size);
48 if (customMem.customFree)
49 customMem.customFree(customMem.opaque, ptr);
MEM_STATIC void ZSTD_customFree(void *ptr, ZSTD_customMem customMem)
MEM_STATIC void * ZSTD_customMalloc(size_t size, ZSTD_customMem customMem)
MEM_STATIC void * ZSTD_customCalloc(size_t size, ZSTD_customMem customMem)
#define ZSTD_memset(p, v, l)