Home
last modified time | relevance | path

Searched refs:customMem (Results 1 – 4 of 4) sorted by relevance

/lib/zstd/
Dzstd_common.c69 void *ZSTD_malloc(size_t size, ZSTD_customMem customMem) { return customMem.customAlloc(customMem.o… in ZSTD_malloc() argument
71 void ZSTD_free(void *ptr, ZSTD_customMem customMem) in ZSTD_free() argument
74 customMem.customFree(customMem.opaque, ptr); in ZSTD_free()
Ddecompress.c97 ZSTD_customMem customMem; member
126 ZSTD_DCtx *ZSTD_createDCtx_advanced(ZSTD_customMem customMem) in ZSTD_createDCtx_advanced() argument
130 if (!customMem.customAlloc || !customMem.customFree) in ZSTD_createDCtx_advanced()
133 dctx = (ZSTD_DCtx *)ZSTD_malloc(sizeof(ZSTD_DCtx), customMem); in ZSTD_createDCtx_advanced()
136 memcpy(&dctx->customMem, &customMem, sizeof(customMem)); in ZSTD_createDCtx_advanced()
151 ZSTD_free(dctx, dctx->customMem); in ZSTD_freeDCtx()
2040 …teDDict_advanced(const void *dict, size_t dictSize, unsigned byReference, ZSTD_customMem customMem) in ZSTD_createDDict_advanced() argument
2042 if (!customMem.customAlloc || !customMem.customFree) in ZSTD_createDDict_advanced()
2046 ZSTD_DDict *const ddict = (ZSTD_DDict *)ZSTD_malloc(sizeof(ZSTD_DDict), customMem); in ZSTD_createDDict_advanced()
2049 ddict->cMem = customMem; in ZSTD_createDDict_advanced()
[all …]
Dcompress.c75 ZSTD_customMem customMem; member
109 static ZSTD_CCtx *ZSTD_createCCtx_advanced(ZSTD_customMem customMem) in ZSTD_createCCtx_advanced() argument
112 if (!customMem.customAlloc || !customMem.customFree) in ZSTD_createCCtx_advanced()
114 cctx = (ZSTD_CCtx *)ZSTD_malloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced()
118 cctx->customMem = customMem; in ZSTD_createCCtx_advanced()
127 cctx->workSpace = ZSTD_stackAllocAll(cctx->customMem.opaque, &cctx->workSpaceSize); in ZSTD_initCCtx()
136 ZSTD_free(cctx->workSpace, cctx->customMem); in ZSTD_freeCCtx()
137 ZSTD_free(cctx, cctx->customMem); in ZSTD_freeCCtx()
270 ZSTD_free(zc->workSpace, zc->customMem); in ZSTD_resetCCtx_advanced()
271 zc->workSpace = ZSTD_malloc(neededSpace, zc->customMem); in ZSTD_resetCCtx_advanced()
[all …]
Dzstd_internal.h235 void *ZSTD_malloc(size_t size, ZSTD_customMem customMem);
236 void ZSTD_free(void *ptr, ZSTD_customMem customMem);