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);
#define NULL
Definition getopt1.c:37
#define MEM_STATIC
Definition mem.h:27
#define ZSTD_memset(d, s, n)
Definition zstd_deps.h:34
MEM_STATIC void ZSTD_customFree(void *ptr, ZSTD_customMem customMem)
Definition allocations.h:45
MEM_STATIC void * ZSTD_customMalloc(size_t size, ZSTD_customMem customMem)
Definition allocations.h:26
MEM_STATIC void * ZSTD_customCalloc(size_t size, ZSTD_customMem customMem)
Definition allocations.h:33