added ZSTDMT_createCCtx_advanced()

make it possible to use custom allocators
This commit is contained in:
Yann Collet committed 2017-05-30 16:12:06 -07:00
1 parent f45ca527a1
commit 44e45e8423
6 files changed
+118 -66

No files matched your search

+2
View File
@@ -421,6 +421,8 @@ typedef struct {
typedef void* (*ZSTD_allocFunction) (void* opaque, size_t size);
typedef void (*ZSTD_freeFunction) (void* opaque, void* address);
typedef struct { ZSTD_allocFunction customAlloc; ZSTD_freeFunction customFree; void* opaque; } ZSTD_customMem;
/* use this constant to defer to stdlib's functions */
static const ZSTD_customMem ZSTD_defaultCMem = { NULL, NULL, NULL};
/***************************************
* Frame size functions