Lines Matching refs:customMem
97 ZSTD_customMem customMem;
126 ZSTD_DCtx *ZSTD_createDCtx_advanced(ZSTD_customMem customMem)
130 if (!customMem.customAlloc || !customMem.customFree)
133 dctx = (ZSTD_DCtx *)ZSTD_malloc(sizeof(ZSTD_DCtx), customMem);
136 memcpy(&dctx->customMem, &customMem, sizeof(customMem));
151 ZSTD_free(dctx, dctx->customMem);
2040 static ZSTD_DDict *ZSTD_createDDict_advanced(const void *dict, size_t dictSize, unsigned byReference, ZSTD_customMem customMem)
2042 if (!customMem.customAlloc || !customMem.customFree)
2046 ZSTD_DDict *const ddict = (ZSTD_DDict *)ZSTD_malloc(sizeof(ZSTD_DDict), customMem);
2049 ddict->cMem = customMem;
2055 void *const internalBuffer = ZSTD_malloc(dictSize, customMem);
2177 ZSTD_customMem customMem;
2192 static ZSTD_DStream *ZSTD_createDStream_advanced(ZSTD_customMem customMem)
2196 if (!customMem.customAlloc || !customMem.customFree)
2199 zds = (ZSTD_DStream *)ZSTD_malloc(sizeof(ZSTD_DStream), customMem);
2203 memcpy(&zds->customMem, &customMem, sizeof(ZSTD_customMem));
2204 zds->dctx = ZSTD_createDCtx_advanced(customMem);
2235 zds->inBuff = (char *)ZSTD_malloc(blockSize, zds->customMem);
2237 zds->outBuff = (char *)ZSTD_malloc(neededOutSize, zds->customMem);
2261 ZSTD_customMem const cMem = zds->customMem;