added ZSTDMT_createCCtx_advanced()

make it possible to use custom allocators
This commit is contained in:
Yann Collet
2017-05-30 16:12:06 -07:00
parent f45ca527a1
commit 44e45e8423
6 changed files with 118 additions and 66 deletions
+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