Home
last modified time | relevance | path

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

12

/freebsd/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()
206 …nst threadPool = (ZSTD_pthread_t*)ZSTD_malloc(numThreads * sizeof(ZSTD_pthread_t), 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/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()
145 … ctx->threads = (ZSTD_pthread_t*)ZSTD_customMalloc(numThreads * sizeof(ZSTD_pthread_t), 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()
214 …readPool = (ZSTD_pthread_t*)ZSTD_customMalloc(numThreads * sizeof(ZSTD_pthread_t), ctx->customMem); in POOL_resize_internal()
[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/sys/contrib/zstd/zlibWrapper/
H A Dzstd_zlibwrapper.c121 static void* ZWRAP_customMalloc(size_t size, ZSTD_customMem customMem) in ZWRAP_customMalloc() argument
123 if (customMem.customAlloc) in ZWRAP_customMalloc()
124 return customMem.customAlloc(customMem.opaque, size); in ZWRAP_customMalloc()
128 static void* ZWRAP_customCalloc(size_t size, ZSTD_customMem customMem) in ZWRAP_customCalloc() argument
130 if (customMem.customAlloc) { in ZWRAP_customCalloc()
133 void* const ptr = customMem.customAlloc(customMem.opaque, size); in ZWRAP_customCalloc()
140 static void ZWRAP_customFree(void* ptr, ZSTD_customMem customMem) in ZWRAP_customFree() argument
143 if (customMem.customFree) in ZWRAP_customFree()
144 customMem.customFree(customMem.opaque, ptr); in ZWRAP_customFree()
160 ZSTD_customMem customMem; member
[all …]
/freebsd/sys/contrib/zstd/lib/legacy/
H A Dzstd_v07.c78 ZSTDLIBv07_API ZSTDv07_DCtx* ZSTDv07_createDCtx_advanced(ZSTDv07_customMem customMem);
2950 ZSTDv07_customMem customMem; member
2977 ZSTDv07_DCtx* ZSTDv07_createDCtx_advanced(ZSTDv07_customMem customMem) in ZSTDv07_createDCtx_advanced() argument
2981 if (!customMem.customAlloc && !customMem.customFree) in ZSTDv07_createDCtx_advanced()
2982 customMem = defaultCustomMem; in ZSTDv07_createDCtx_advanced()
2984 if (!customMem.customAlloc || !customMem.customFree) in ZSTDv07_createDCtx_advanced()
2987 dctx = (ZSTDv07_DCtx*) customMem.customAlloc(customMem.opaque, sizeof(ZSTDv07_DCtx)); in ZSTDv07_createDCtx_advanced()
2989 memcpy(&dctx->customMem, &customMem, sizeof(ZSTDv07_customMem)); in ZSTDv07_createDCtx_advanced()
3002 dctx->customMem.customFree(dctx->customMem.opaque, dctx); in ZSTDv07_freeDCtx()
4186 …DDict* ZSTDv07_createDDict_advanced(const void* dict, size_t dictSize, ZSTDv07_customMem customMem) in ZSTDv07_createDDict_advanced() argument
[all …]
/freebsd/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/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.c129 static size_t ZSTD_DDictHashSet_expand(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { in ZSTD_DDictHashSet_expand() argument
131 …** newTable = (const ZSTD_DDict**)ZSTD_customCalloc(sizeof(ZSTD_DDict*) * newTableSize, customMem); in ZSTD_DDictHashSet_expand()
146 ZSTD_customFree((void*)oldTable, customMem); in ZSTD_DDictHashSet_expand()
176 static ZSTD_DDictHashSet* ZSTD_createDDictHashSet(ZSTD_customMem customMem) { in ZSTD_createDDictHashSet() argument
177 …TD_DDictHashSet* ret = (ZSTD_DDictHashSet*)ZSTD_customMalloc(sizeof(ZSTD_DDictHashSet), customMem); in ZSTD_createDDictHashSet()
181 …nst ZSTD_DDict**)ZSTD_customCalloc(DDICT_HASHSET_TABLE_BASE_SIZE * sizeof(ZSTD_DDict*), customMem); in ZSTD_createDDictHashSet()
183 ZSTD_customFree(ret, customMem); in ZSTD_createDDictHashSet()
194 static void ZSTD_freeDDictHashSet(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { in ZSTD_freeDDictHashSet() argument
197 ZSTD_customFree((void*)hashSet->ddictPtrTable, customMem); in ZSTD_freeDDictHashSet()
200 ZSTD_customFree(hashSet, customMem); in ZSTD_freeDDictHashSet()
[all …]
H A Dzstd_decompress_internal.h151 ZSTD_customMem customMem; member
/freebsd/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/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()
81 ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem) in ZSTD_createCCtx_advanced() argument
85 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createCCtx_advanced()
86 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_malloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced()
88 ZSTD_initCCtx(cctx, customMem); in ZSTD_createCCtx_advanced()
122 ZSTD_free(cctx->localDict.dictBuffer, cctx->customMem); in ZSTD_clearAllDicts()
144 ZSTD_cwksp_free(&cctx->workspace, cctx->customMem); in ZSTD_freeCCtxContent()
156 ZSTD_free(cctx, cctx->customMem); in ZSTD_freeCCtx()
205 ZSTD_customMem customMem) in ZSTD_createCCtxParams_advanced() argument
[all …]
/freebsd/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/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/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()
109 ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem) in ZSTD_createCCtx_advanced() argument
113 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createCCtx_advanced()
114 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_customMalloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced()
116 ZSTD_initCCtx(cctx, customMem); in ZSTD_createCCtx_advanced()
150 ZSTD_customFree(cctx->localDict.dictBuffer, cctx->customMem); in ZSTD_clearAllDicts()
172 ZSTD_cwksp_free(&cctx->workspace, cctx->customMem); in ZSTD_freeCCtxContent()
184 ZSTD_customFree(cctx, cctx->customMem); in ZSTD_freeCCtx()
302 ZSTD_customMem customMem) in ZSTD_createCCtxParams_advanced() argument
[all …]

12