Home
last modified time | relevance | path

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

/freebsd-12.1/sys/contrib/zstd/lib/common/
H A 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()
H A 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 …]
H A 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);
H A Dpool.h33 POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customMem customMem);
/freebsd-12.1/sys/contrib/zstd/lib/legacy/
H A Dzstd_v07.c2979 if (!customMem.customAlloc && !customMem.customFree) in ZSTDv07_createDCtx_advanced()
2982 if (!customMem.customAlloc || !customMem.customFree) in ZSTDv07_createDCtx_advanced()
3000 dctx->customMem.customFree(dctx->customMem.opaque, dctx); in ZSTDv07_freeDCtx()
4151 if (!customMem.customAlloc && !customMem.customFree) in ZSTDv07_createDDict_advanced()
4154 if (!customMem.customAlloc || !customMem.customFree) in ZSTDv07_createDDict_advanced()
4163 customMem.customFree(customMem.opaque, ddict); in ZSTDv07_createDDict_advanced()
4164 customMem.customFree(customMem.opaque, dctx); in ZSTDv07_createDDict_advanced()
4173 customMem.customFree(customMem.opaque, dctx); in ZSTDv07_createDDict_advanced()
4304 if (!customMem.customAlloc && !customMem.customFree) in ZBUFFv07_createDCtx_advanced()
4307 if (!customMem.customAlloc || !customMem.customFree) in ZBUFFv07_createDCtx_advanced()
[all …]
/freebsd-12.1/sys/contrib/zstd/lib/deprecated/
H A 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()
H A 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()
H A 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.1/sys/contrib/zstd/zlibWrapper/
H A 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.1/sys/contrib/zstd/lib/compress/
H A Dzstd_compress.c58 ZSTD_customMem customMem; member
71 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createCCtx_advanced()
74 cctx->customMem = customMem; in ZSTD_createCCtx_advanced()
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()
181 params->customMem = customMem; in ZSTD_createCCtxParams_advanced()
195 ZSTD_free(params, params->customMem); in ZSTD_freeCCtxParams()
1169 memcpy(&dstCCtx->customMem, &srcCCtx->customMem, sizeof(ZSTD_customMem)); in ZSTD_copyCCtx_internal()
2673 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createCDict_advanced()
[all …]
H A Dzstd_compress_internal.h186 ZSTD_customMem customMem; member
203 ZSTD_customMem customMem; member
H A 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.1/sys/contrib/zstd/lib/
H A 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.1/sys/contrib/zstd/tests/
H A 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.1/sys/contrib/zstd/lib/decompress/
H A 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()
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()
2400 ddict->cMem = customMem; in ZSTD_createDDict_advanced()
2552 ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem) in ZSTD_createDStream_advanced() argument
2554 return ZSTD_createDCtx_advanced(customMem); in ZSTD_createDStream_advanced()
[all …]