Lines Matching refs:customMem

75 	ZSTD_customMem customMem;
109 static ZSTD_CCtx *ZSTD_createCCtx_advanced(ZSTD_customMem customMem)
112 if (!customMem.customAlloc || !customMem.customFree)
114 cctx = (ZSTD_CCtx *)ZSTD_malloc(sizeof(ZSTD_CCtx), customMem);
118 cctx->customMem = customMem;
127 cctx->workSpace = ZSTD_stackAllocAll(cctx->customMem.opaque, &cctx->workSpaceSize);
136 ZSTD_free(cctx->workSpace, cctx->customMem);
137 ZSTD_free(cctx, cctx->customMem);
270 ZSTD_free(zc->workSpace, zc->customMem);
271 zc->workSpace = ZSTD_malloc(neededSpace, zc->customMem);
353 memcpy(&dstCCtx->customMem, &srcCCtx->customMem, sizeof(ZSTD_customMem));
2847 static ZSTD_CDict *ZSTD_createCDict_advanced(const void *dictBuffer, size_t dictSize, unsigned byReference, ZSTD_parameters params, ZSTD_customMem customMem)
2849 if (!customMem.customAlloc || !customMem.customFree)
2853 ZSTD_CDict *const cdict = (ZSTD_CDict *)ZSTD_malloc(sizeof(ZSTD_CDict), customMem);
2854 ZSTD_CCtx *const cctx = ZSTD_createCCtx_advanced(customMem);
2857 ZSTD_free(cdict, customMem);
2866 void *const internalBuffer = ZSTD_malloc(dictSize, customMem);
2868 ZSTD_free(cctx, customMem);
2869 ZSTD_free(cdict, customMem);
2880 ZSTD_free(cdict->dictBuffer, customMem);
2881 ZSTD_free(cdict, customMem);
2904 ZSTD_customMem const cMem = cdict->refContext->customMem;
2970 ZSTD_customMem customMem;
2982 ZSTD_CStream *ZSTD_createCStream_advanced(ZSTD_customMem customMem)
2986 if (!customMem.customAlloc || !customMem.customFree)
2989 zcs = (ZSTD_CStream *)ZSTD_malloc(sizeof(ZSTD_CStream), customMem);
2993 memcpy(&zcs->customMem, &customMem, sizeof(ZSTD_customMem));
2994 zcs->cctx = ZSTD_createCCtx_advanced(customMem);
3007 ZSTD_customMem const cMem = zcs->customMem;
3062 ZSTD_free(zcs->inBuff, zcs->customMem);
3063 zcs->inBuff = (char *)ZSTD_malloc(neededInBuffSize, zcs->customMem);
3071 ZSTD_free(zcs->outBuff, zcs->customMem);
3072 zcs->outBuff = (char *)ZSTD_malloc(zcs->outBuffSize, zcs->customMem);
3079 zcs->cdictLocal = ZSTD_createCDict_advanced(dict, dictSize, 0, params, zcs->customMem);