Home
last modified time | relevance | path

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

12

/freebsd-14.2/sys/contrib/openzfs/module/zstd/lib/common/
H A Dzstd_common.c56 void* ZSTD_malloc(size_t size, ZSTD_customMem customMem) in ZSTD_malloc() argument
58 if (customMem.customAlloc) in ZSTD_malloc()
59 return customMem.customAlloc(customMem.opaque, size); in ZSTD_malloc()
63 void* ZSTD_calloc(size_t size, ZSTD_customMem customMem) in ZSTD_calloc() argument
65 if (customMem.customAlloc) { in ZSTD_calloc()
68 void* const ptr = customMem.customAlloc(customMem.opaque, size); in ZSTD_calloc()
75 void ZSTD_free(void* ptr, ZSTD_customMem customMem) in ZSTD_free() argument
78 if (customMem.customFree) in ZSTD_free()
79 customMem.customFree(customMem.opaque, ptr); in ZSTD_free()
H A Dpool.c35 ZSTD_customMem customMem; member
113 ZSTD_customMem customMem) { in POOL_create_advanced() argument
118 ctx = (POOL_ctx*)ZSTD_calloc(sizeof(POOL_ctx), customMem); in POOL_create_advanced()
125 ctx->queue = (POOL_job*)ZSTD_malloc(ctx->queueSize * sizeof(POOL_job), customMem); in POOL_create_advanced()
139 ctx->threads = (ZSTD_pthread_t*)ZSTD_malloc(numThreads * sizeof(ZSTD_pthread_t), customMem); in POOL_create_advanced()
141 ctx->customMem = customMem; in POOL_create_advanced()
182 ZSTD_free(ctx->queue, ctx->customMem); in POOL_free()
183 ZSTD_free(ctx->threads, ctx->customMem); in POOL_free()
184 ZSTD_free(ctx, ctx->customMem); in POOL_free()
210 ZSTD_free(ctx->threads, ctx->customMem); in POOL_resize_internal()
[all …]
H A Dzstd_internal.h386 void* ZSTD_malloc(size_t size, ZSTD_customMem customMem);
387 void* ZSTD_calloc(size_t size, ZSTD_customMem customMem);
388 void ZSTD_free(void* ptr, ZSTD_customMem customMem);
H A Dpool.h34 ZSTD_customMem customMem);
/freebsd-14.2/sys/contrib/zstd/lib/common/
H A Dzstd_common.c56 void* ZSTD_customMalloc(size_t size, ZSTD_customMem customMem) in ZSTD_customMalloc() argument
58 if (customMem.customAlloc) in ZSTD_customMalloc()
59 return customMem.customAlloc(customMem.opaque, size); in ZSTD_customMalloc()
63 void* ZSTD_customCalloc(size_t size, ZSTD_customMem customMem) in ZSTD_customCalloc() argument
65 if (customMem.customAlloc) { in ZSTD_customCalloc()
68 void* const ptr = customMem.customAlloc(customMem.opaque, size); in ZSTD_customCalloc()
75 void ZSTD_customFree(void* ptr, ZSTD_customMem customMem) in ZSTD_customFree() argument
78 if (customMem.customFree) in ZSTD_customFree()
79 customMem.customFree(customMem.opaque, ptr); in ZSTD_customFree()
H A Dpool.c35 ZSTD_customMem customMem; member
118 ZSTD_customMem customMem) in POOL_create_advanced() argument
124 ctx = (POOL_ctx*)ZSTD_customCalloc(sizeof(POOL_ctx), customMem); in POOL_create_advanced()
131 ctx->queue = (POOL_job*)ZSTD_customMalloc(ctx->queueSize * sizeof(POOL_job), customMem); in POOL_create_advanced()
147 ctx->customMem = customMem; in POOL_create_advanced()
188 ZSTD_customFree(ctx->queue, ctx->customMem); in POOL_free()
189 ZSTD_customFree(ctx->threads, ctx->customMem); in POOL_free()
190 ZSTD_customFree(ctx, ctx->customMem); in POOL_free()
218 ZSTD_customFree(ctx->threads, ctx->customMem); in POOL_resize_internal()
320 POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customMem customMem) in POOL_create_advanced() argument
[all …]
H A Dzstd_internal.h358 void* ZSTD_customMalloc(size_t size, ZSTD_customMem customMem);
359 void* ZSTD_customCalloc(size_t size, ZSTD_customMem customMem);
360 void ZSTD_customFree(void* ptr, ZSTD_customMem customMem);
H A Dpool.h34 ZSTD_customMem customMem);
/freebsd-14.2/sys/contrib/zstd/zlibWrapper/
H A Dzstd_zlibwrapper.c123 if (customMem.customAlloc) in ZWRAP_customMalloc()
124 return customMem.customAlloc(customMem.opaque, size); in ZWRAP_customMalloc()
130 if (customMem.customAlloc) { in ZWRAP_customCalloc()
133 void* const ptr = customMem.customAlloc(customMem.opaque, size); in ZWRAP_customCalloc()
144 customMem.customFree(customMem.opaque, ptr); in ZWRAP_customFree()
160 ZSTD_customMem customMem; member
190 customMem.opaque = strm; in ZWRAP_createCCtx()
196 zwc->customMem = customMem; in ZWRAP_createCCtx()
529 ZSTD_customMem customMem; member
550 customMem.opaque = strm; in ZWRAP_createDCtx()
[all …]
/freebsd-14.2/sys/contrib/zstd/lib/legacy/
H A Dzstd_v07.c2981 if (!customMem.customAlloc && !customMem.customFree) in ZSTDv07_createDCtx_advanced()
2984 if (!customMem.customAlloc || !customMem.customFree) in ZSTDv07_createDCtx_advanced()
3002 dctx->customMem.customFree(dctx->customMem.opaque, dctx); in ZSTDv07_freeDCtx()
4188 if (!customMem.customAlloc && !customMem.customFree) in ZSTDv07_createDDict_advanced()
4191 if (!customMem.customAlloc || !customMem.customFree) in ZSTDv07_createDDict_advanced()
4200 customMem.customFree(customMem.opaque, ddict); in ZSTDv07_createDDict_advanced()
4201 customMem.customFree(customMem.opaque, dctx); in ZSTDv07_createDDict_advanced()
4210 customMem.customFree(customMem.opaque, dctx); in ZSTDv07_createDDict_advanced()
4341 if (!customMem.customAlloc && !customMem.customFree) in ZBUFFv07_createDCtx_advanced()
4344 if (!customMem.customAlloc || !customMem.customFree) in ZBUFFv07_createDCtx_advanced()
[all …]
/freebsd-14.2/sys/contrib/zstd/lib/decompress/
H A Dzstd_ddict.c148 ZSTD_customMem customMem) in ZSTD_createDDict_advanced() argument
150 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createDDict_advanced()
152 { ZSTD_DDict* const ddict = (ZSTD_DDict*) ZSTD_customMalloc(sizeof(ZSTD_DDict), customMem); in ZSTD_createDDict_advanced()
154 ddict->cMem = customMem; in ZSTD_createDDict_advanced()
H A Dzstd_decompress.c146 ZSTD_customFree((void*)oldTable, customMem); in ZSTD_DDictHashSet_expand()
183 ZSTD_customFree(ret, customMem); in ZSTD_createDDictHashSet()
197 ZSTD_customFree((void*)hashSet->ddictPtrTable, customMem); in ZSTD_freeDDictHashSet()
200 ZSTD_customFree(hashSet, customMem); in ZSTD_freeDDictHashSet()
290 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createDCtx_internal()
294 dctx->customMem = customMem; in ZSTD_createDCtx_internal()
300 ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem) in ZSTD_createDCtx_advanced() argument
302 return ZSTD_createDCtx_internal(customMem); in ZSTD_createDCtx_advanced()
323 { ZSTD_customMem const cMem = dctx->customMem; in ZSTD_freeDCtx()
1564 ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem) in ZSTD_createDStream_advanced() argument
[all …]
H A Dzstd_decompress_internal.h151 ZSTD_customMem customMem; member
/freebsd-14.2/sys/contrib/openzfs/module/zstd/lib/decompress/
H A Dzstd_ddict.c148 ZSTD_customMem customMem) in ZSTD_createDDict_advanced() argument
150 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createDDict_advanced()
152 { ZSTD_DDict* const ddict = (ZSTD_DDict*) ZSTD_malloc(sizeof(ZSTD_DDict), customMem); in ZSTD_createDDict_advanced()
154 ddict->cMem = customMem; in ZSTD_createDDict_advanced()
H A Dzstd_decompress.c135 ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem) in ZSTD_createDCtx_advanced() argument
137 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createDCtx_advanced()
139 { ZSTD_DCtx* const dctx = (ZSTD_DCtx*)ZSTD_malloc(sizeof(*dctx), customMem); in ZSTD_createDCtx_advanced()
141 dctx->customMem = customMem; in ZSTD_createDCtx_advanced()
165 { ZSTD_customMem const cMem = dctx->customMem; in ZSTD_freeDCtx()
1276 ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem) in ZSTD_createDStream_advanced() argument
1278 return ZSTD_createDCtx_advanced(customMem); in ZSTD_createDStream_advanced()
1300 …ocal = ZSTD_createDDict_advanced(dict, dictSize, dictLoadMethod, dictContentType, dctx->customMem); in ZSTD_DCtx_loadDictionary_advanced()
1748 ZSTD_free(zds->inBuff, zds->customMem); in ZSTD_decompressStream()
1751 zds->inBuff = (char*)ZSTD_malloc(bufferSize, zds->customMem); in ZSTD_decompressStream()
H A Dzstd_decompress_internal.h126 ZSTD_customMem customMem; member
/freebsd-14.2/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.h195 …"use ZSTD_createCStream_advanced") ZBUFF_CCtx* ZBUFF_createCCtx_advanced(ZSTD_customMem customMem);
199 …"use ZSTD_createDStream_advanced") ZBUFF_DCtx* ZBUFF_createDCtx_advanced(ZSTD_customMem customMem);
H A Dzbuff_compress.c59 ZBUFF_CCtx* ZBUFF_createCCtx_advanced(ZSTD_customMem customMem) in ZBUFF_createCCtx_advanced() argument
61 return ZSTD_createCStream_advanced(customMem); in ZBUFF_createCCtx_advanced()
/freebsd-14.2/sys/contrib/openzfs/module/zstd/lib/compress/
H A Dzstd_cwksp.h458 MEM_STATIC size_t ZSTD_cwksp_create(ZSTD_cwksp* ws, size_t size, ZSTD_customMem customMem) { in ZSTD_cwksp_create() argument
459 void* workspace = ZSTD_malloc(size, customMem); in ZSTD_cwksp_create()
466 MEM_STATIC void ZSTD_cwksp_free(ZSTD_cwksp* ws, ZSTD_customMem customMem) { in ZSTD_cwksp_free() argument
470 ZSTD_free(ptr, customMem); in ZSTD_cwksp_free()
H A Dzstd_compress.c59 ZSTD_customMem customMem; member
73 cctx->customMem = memManager; in ZSTD_initCCtx()
85 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createCCtx_advanced()
88 ZSTD_initCCtx(cctx, customMem); in ZSTD_createCCtx_advanced()
205 ZSTD_customMem customMem) in ZSTD_createCCtxParams_advanced() argument
208 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createCCtxParams_advanced()
212 params->customMem = customMem; in ZSTD_createCCtxParams_advanced()
885 cctx->customMem); in ZSTD_initLocalDict()
1778 memcpy(&dstCCtx->customMem, &srcCCtx->customMem, sizeof(ZSTD_customMem)); in ZSTD_copyCCtx_internal()
3410 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createCDict_advanced()
[all …]
/freebsd-14.2/sys/contrib/zstd/lib/
H A Dzstd.h1594 ZSTDLIB_STATIC_API ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem);
1595 ZSTDLIB_STATIC_API ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem);
1596 ZSTDLIB_STATIC_API ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem);
1597 ZSTDLIB_STATIC_API ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem);
1603 ZSTD_customMem customMem);
1629 ZSTD_customMem customMem);
1635 ZSTD_customMem customMem);
/freebsd-14.2/sys/contrib/openzfs/module/zstd/lib/
H A Dzstd.h1377 ZSTDLIB_API ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem);
1378 ZSTDLIB_API ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem);
1379 ZSTDLIB_API ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem);
1380 ZSTDLIB_API ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem);
1386 ZSTD_customMem customMem);
1391 ZSTD_customMem customMem);
/freebsd-14.2/sys/contrib/zstd/lib/compress/
H A Dzstd_cwksp.h586 MEM_STATIC size_t ZSTD_cwksp_create(ZSTD_cwksp* ws, size_t size, ZSTD_customMem customMem) { in ZSTD_cwksp_create() argument
587 void* workspace = ZSTD_customMalloc(size, customMem); in ZSTD_cwksp_create()
594 MEM_STATIC void ZSTD_cwksp_free(ZSTD_cwksp* ws, ZSTD_customMem customMem) { in ZSTD_cwksp_free() argument
598 ZSTD_customFree(ptr, customMem); in ZSTD_cwksp_free()
H A Dzstd_compress.c83 ZSTD_customMem customMem; member
101 cctx->customMem = memManager; in ZSTD_initCCtx()
113 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createCCtx_advanced()
305 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createCCtxParams_advanced()
310 params->customMem = customMem; in ZSTD_createCCtxParams_advanced()
1125 cctx->customMem); in ZSTD_initLocalDict()
2218 ZSTD_memcpy(&dstCCtx->customMem, &srcCCtx->customMem, sizeof(ZSTD_customMem)); in ZSTD_copyCCtx_internal()
4848 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createCDict_advanced_internal()
4870 cdict->customMem = customMem; in ZSTD_createCDict_advanced_internal()
4887 cctxParams.customMem = customMem; in ZSTD_createCDict_advanced()
[all …]

12