Home
last modified time | relevance | path

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

/freebsd-12-stable/sys/contrib/zstd/lib/common/
Dzstd_common.c59 void* ZSTD_malloc(size_t size, ZSTD_customMem customMem) in ZSTD_malloc() argument
61 if (customMem.customAlloc) in ZSTD_malloc()
62 return customMem.customAlloc(customMem.opaque, size); in ZSTD_malloc()
66 void* ZSTD_calloc(size_t size, ZSTD_customMem customMem) in ZSTD_calloc() argument
68 if (customMem.customAlloc) { in ZSTD_calloc()
71 void* const ptr = customMem.customAlloc(customMem.opaque, size); in ZSTD_calloc()
78 void ZSTD_free(void* ptr, ZSTD_customMem customMem) in ZSTD_free() argument
81 if (customMem.customFree) in ZSTD_free()
82 customMem.customFree(customMem.opaque, ptr); in ZSTD_free()
Dpool.c34 ZSTD_customMem customMem; member
106 POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customMem customMem) { in POOL_create_advanced() argument
111 ctx = (POOL_ctx*)ZSTD_calloc(sizeof(POOL_ctx), customMem); in POOL_create_advanced()
118 ctx->queue = (POOL_job*)ZSTD_malloc(ctx->queueSize * sizeof(POOL_job), customMem); in POOL_create_advanced()
128 ctx->threads = (ZSTD_pthread_t*)ZSTD_malloc(numThreads * sizeof(ZSTD_pthread_t), customMem); in POOL_create_advanced()
130 ctx->customMem = customMem; in POOL_create_advanced()
170 ZSTD_free(ctx->queue, ctx->customMem); in POOL_free()
171 ZSTD_free(ctx->threads, ctx->customMem); in POOL_free()
172 ZSTD_free(ctx, ctx->customMem); in POOL_free()
254 POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customMem customMem) { in POOL_create_advanced() argument
[all …]
Dzstd_internal.h238 void* ZSTD_malloc(size_t size, ZSTD_customMem customMem);
239 void* ZSTD_calloc(size_t size, ZSTD_customMem customMem);
240 void ZSTD_free(void* ptr, ZSTD_customMem customMem);
Dpool.h33 POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customMem customMem);
/freebsd-12-stable/sys/contrib/zstd/lib/legacy/
Dzstd_v07.c78 ZSTDLIBv07_API ZSTDv07_DCtx* ZSTDv07_createDCtx_advanced(ZSTDv07_customMem customMem);
2948 ZSTDv07_customMem customMem; member
2975 ZSTDv07_DCtx* ZSTDv07_createDCtx_advanced(ZSTDv07_customMem customMem) in ZSTDv07_createDCtx_advanced() argument
2979 if (!customMem.customAlloc && !customMem.customFree) in ZSTDv07_createDCtx_advanced()
2980 customMem = defaultCustomMem; in ZSTDv07_createDCtx_advanced()
2982 if (!customMem.customAlloc || !customMem.customFree) in ZSTDv07_createDCtx_advanced()
2985 dctx = (ZSTDv07_DCtx*) customMem.customAlloc(customMem.opaque, sizeof(ZSTDv07_DCtx)); in ZSTDv07_createDCtx_advanced()
2987 memcpy(&dctx->customMem, &customMem, sizeof(ZSTDv07_customMem)); in ZSTDv07_createDCtx_advanced()
3000 dctx->customMem.customFree(dctx->customMem.opaque, dctx); in ZSTDv07_freeDCtx()
4149 …DDict* ZSTDv07_createDDict_advanced(const void* dict, size_t dictSize, ZSTDv07_customMem customMem) in ZSTDv07_createDDict_advanced() argument
[all …]
/freebsd-12-stable/sys/contrib/zstd/lib/deprecated/
Dzbuff_decompress.c25 ZBUFF_DCtx* ZBUFF_createDCtx_advanced(ZSTD_customMem customMem) in ZBUFF_createDCtx_advanced() argument
27 return ZSTD_createDStream_advanced(customMem); in ZBUFF_createDCtx_advanced()
Dzbuff_compress.c58 ZBUFF_CCtx* ZBUFF_createCCtx_advanced(ZSTD_customMem customMem) in ZBUFF_createCCtx_advanced() argument
60 return ZSTD_createCStream_advanced(customMem); in ZBUFF_createCCtx_advanced()
Dzbuff.h194 …"use ZSTD_createCStream_advanced") ZBUFF_CCtx* ZBUFF_createCCtx_advanced(ZSTD_customMem customMem);
198 …"use ZSTD_createDStream_advanced") ZBUFF_DCtx* ZBUFF_createDCtx_advanced(ZSTD_customMem customMem);
/freebsd-12-stable/sys/contrib/zstd/zlibWrapper/
Dzstd_zlibwrapper.c94 ZSTD_customMem customMem; member
110 ZSTD_free(zwc, zwc->customMem); in ZWRAP_freeCCtx()
125 zwc->customMem = ZWRAP_customMem; } in ZWRAP_createCCtx()
270 zwc->zbc = ZSTD_createCStream_advanced(zwc->customMem); in z_deflateSetDictionary()
296 zwc->zbc = ZSTD_createCStream_advanced(zwc->customMem); in z_deflate()
443 ZSTD_customMem customMem; member
466 zwd->customMem = ZWRAP_customMem; } in ZWRAP_createDCtx()
480 ZSTD_free(zwd->version, zwd->customMem); in ZWRAP_freeDCtx()
481 ZSTD_free(zwd, zwd->customMem); in ZWRAP_freeDCtx()
523 zwd->version = ZSTD_malloc(strlen(version)+1, zwd->customMem); in z_inflateInit_()
[all …]
/freebsd-12-stable/sys/contrib/zstd/lib/compress/
Dzstd_compress.c58 ZSTD_customMem customMem; member
67 ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem) in ZSTD_createCCtx_advanced() argument
71 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createCCtx_advanced()
72 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_calloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced()
74 cctx->customMem = customMem; in ZSTD_createCCtx_advanced()
109 ZSTD_free(cctx->workSpace, cctx->customMem); cctx->workSpace = NULL; in ZSTD_freeCCtx()
114 ZSTD_free(cctx, cctx->customMem); in ZSTD_freeCCtx()
174 ZSTD_customMem customMem) in ZSTD_createCCtxParams_advanced() argument
177 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createCCtxParams_advanced()
179 sizeof(ZSTD_CCtx_params), customMem); in ZSTD_createCCtxParams_advanced()
[all …]
Dzstd_compress_internal.h186 ZSTD_customMem customMem; member
203 ZSTD_customMem customMem; member
Dzstdmt_compress.c446 ZSTD_customMem cMem = params.customMem; in ZSTDMT_serialState_reset()
492 ZSTD_customMem cMem = serialState->params.customMem; in ZSTDMT_serialState_free()
/freebsd-12-stable/sys/contrib/zstd/lib/
Dzstd.h595 ZSTDLIB_API ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem);
596 ZSTDLIB_API ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem);
597 ZSTDLIB_API ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem);
598 ZSTDLIB_API ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem);
604 ZSTD_customMem customMem);
609 ZSTD_customMem customMem);
/freebsd-12-stable/sys/contrib/zstd/tests/
Dzbufftest.c119 static int basicUnitTests(U32 seed, double compressibility, ZSTD_customMem customMem) in basicUnitTests() argument
131 ZBUFF_CCtx* zc = ZBUFF_createCCtx_advanced(customMem); in basicUnitTests()
132 ZBUFF_DCtx* zd = ZBUFF_createDCtx_advanced(customMem); in basicUnitTests()
497 ZSTD_customMem customMem = { ZBUFF_allocFunction, ZBUFF_freeFunction, NULL }; in main() local
605 …result = basicUnitTests(0, ((double)proba) / 100, customMem); /* use custom memory allocation fun… in main()
/freebsd-12-stable/sys/contrib/zstd/lib/decompress/
Dzstd_decompress.c133 ZSTD_customMem customMem; member
211 ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem) in ZSTD_createDCtx_advanced() argument
213 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createDCtx_advanced()
215 { ZSTD_DCtx* const dctx = (ZSTD_DCtx*)ZSTD_malloc(sizeof(*dctx), customMem); in ZSTD_createDCtx_advanced()
217 dctx->customMem = customMem; in ZSTD_createDCtx_advanced()
235 { ZSTD_customMem const cMem = dctx->customMem; in ZSTD_freeDCtx()
2394 ZSTD_customMem customMem) in ZSTD_createDDict_advanced() argument
2396 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createDDict_advanced()
2398 { ZSTD_DDict* const ddict = (ZSTD_DDict*) ZSTD_malloc(sizeof(ZSTD_DDict), customMem); in ZSTD_createDDict_advanced()
2400 ddict->cMem = customMem; in ZSTD_createDDict_advanced()
[all …]