Home
last modified time | relevance | path

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

12

/freebsd/sys/contrib/openzfs/module/zstd/lib/common/
H A Dallocations.h27 MEM_STATIC void* ZSTD_customMalloc(size_t size, ZSTD_customMem customMem) in ZSTD_customMalloc() argument
29 if (customMem.customAlloc) in ZSTD_customMalloc()
30 return customMem.customAlloc(customMem.opaque, size); in ZSTD_customMalloc()
34 MEM_STATIC void* ZSTD_customCalloc(size_t size, ZSTD_customMem customMem) in ZSTD_customCalloc() argument
36 if (customMem.customAlloc) { in ZSTD_customCalloc()
39 void* const ptr = customMem.customAlloc(customMem.opaque, size); in ZSTD_customCalloc()
46 MEM_STATIC void ZSTD_customFree(void* ptr, ZSTD_customMem customMem) in ZSTD_customFree() argument
49 if (customMem.customFree) in ZSTD_customFree()
50 customMem.customFree(customMem.opaque, ptr); in ZSTD_customFree()
H A Dpool.c36 ZSTD_customMem customMem; member
117 ZSTD_customMem customMem) in POOL_create_advanced() argument
123 ctx = (POOL_ctx*)ZSTD_customCalloc(sizeof(POOL_ctx), customMem); in POOL_create_advanced()
130 ctx->queue = (POOL_job*)ZSTD_customCalloc(ctx->queueSize * sizeof(POOL_job), customMem); in POOL_create_advanced()
144 … ctx->threads = (ZSTD_pthread_t*)ZSTD_customCalloc(numThreads * sizeof(ZSTD_pthread_t), customMem); in POOL_create_advanced()
146 ctx->customMem = customMem; in POOL_create_advanced()
187 ZSTD_customFree(ctx->queue, ctx->customMem); in POOL_free()
188 ZSTD_customFree(ctx->threads, ctx->customMem); in POOL_free()
189 ZSTD_customFree(ctx, ctx->customMem); in POOL_free()
224 …readPool = (ZSTD_pthread_t*)ZSTD_customCalloc(numThreads * sizeof(ZSTD_pthread_t), ctx->customMem); in POOL_resize_internal()
[all …]
H A Dpool.h31 ZSTD_customMem customMem);
/freebsd/sys/contrib/zstd/lib/common/
H A Dallocations.h26 MEM_STATIC void* ZSTD_customMalloc(size_t size, ZSTD_customMem customMem) in ZSTD_customMalloc() argument
28 if (customMem.customAlloc) in ZSTD_customMalloc()
29 return customMem.customAlloc(customMem.opaque, size); in ZSTD_customMalloc()
33 MEM_STATIC void* ZSTD_customCalloc(size_t size, ZSTD_customMem customMem) in ZSTD_customCalloc() argument
35 if (customMem.customAlloc) { in ZSTD_customCalloc()
38 void* const ptr = customMem.customAlloc(customMem.opaque, size); in ZSTD_customCalloc()
45 MEM_STATIC void ZSTD_customFree(void* ptr, ZSTD_customMem customMem) in ZSTD_customFree() argument
48 if (customMem.customFree) in ZSTD_customFree()
49 customMem.customFree(customMem.opaque, ptr); in ZSTD_customFree()
H A Dpool.c35 ZSTD_customMem customMem; member
116 ZSTD_customMem customMem) in POOL_create_advanced() argument
122 ctx = (POOL_ctx*)ZSTD_customCalloc(sizeof(POOL_ctx), customMem); in POOL_create_advanced()
129 ctx->queue = (POOL_job*)ZSTD_customCalloc(ctx->queueSize * sizeof(POOL_job), customMem); in POOL_create_advanced()
143 … ctx->threads = (ZSTD_pthread_t*)ZSTD_customCalloc(numThreads * sizeof(ZSTD_pthread_t), customMem); in POOL_create_advanced()
145 ctx->customMem = customMem; in POOL_create_advanced()
186 ZSTD_customFree(ctx->queue, ctx->customMem); in POOL_free()
187 ZSTD_customFree(ctx->threads, ctx->customMem); in POOL_free()
188 ZSTD_customFree(ctx, ctx->customMem); in POOL_free()
223 …readPool = (ZSTD_pthread_t*)ZSTD_customCalloc(numThreads * sizeof(ZSTD_pthread_t), ctx->customMem); in POOL_resize_internal()
[all …]
H A Dpool.h30 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.c79 ZSTDLIBv07_API ZSTDv07_DCtx* ZSTDv07_createDCtx_advanced(ZSTDv07_customMem customMem);
2895 ZSTDv07_customMem customMem; member
2922 ZSTDv07_DCtx* ZSTDv07_createDCtx_advanced(ZSTDv07_customMem customMem) in ZSTDv07_createDCtx_advanced() argument
2926 if (!customMem.customAlloc && !customMem.customFree) in ZSTDv07_createDCtx_advanced()
2927 customMem = defaultCustomMem; in ZSTDv07_createDCtx_advanced()
2929 if (!customMem.customAlloc || !customMem.customFree) in ZSTDv07_createDCtx_advanced()
2932 dctx = (ZSTDv07_DCtx*) customMem.customAlloc(customMem.opaque, sizeof(ZSTDv07_DCtx)); in ZSTDv07_createDCtx_advanced()
2934 memcpy(&dctx->customMem, &customMem, sizeof(ZSTDv07_customMem)); in ZSTDv07_createDCtx_advanced()
2947 dctx->customMem.customFree(dctx->customMem.opaque, dctx); in ZSTDv07_freeDCtx()
4134 …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.c149 ZSTD_customMem customMem) in ZSTD_createDDict_advanced() argument
151 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createDDict_advanced()
153 { ZSTD_DDict* const ddict = (ZSTD_DDict*) ZSTD_customMalloc(sizeof(ZSTD_DDict), customMem); in ZSTD_createDDict_advanced()
155 ddict->cMem = customMem; in ZSTD_createDDict_advanced()
H A Dzstd_decompress.c132 static size_t ZSTD_DDictHashSet_expand(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { in ZSTD_DDictHashSet_expand() argument
134 …** newTable = (const ZSTD_DDict**)ZSTD_customCalloc(sizeof(ZSTD_DDict*) * newTableSize, customMem); in ZSTD_DDictHashSet_expand()
149 ZSTD_customFree((void*)oldTable, customMem); in ZSTD_DDictHashSet_expand()
179 static ZSTD_DDictHashSet* ZSTD_createDDictHashSet(ZSTD_customMem customMem) { in ZSTD_createDDictHashSet() argument
180 …TD_DDictHashSet* ret = (ZSTD_DDictHashSet*)ZSTD_customMalloc(sizeof(ZSTD_DDictHashSet), customMem); in ZSTD_createDDictHashSet()
184 …nst ZSTD_DDict**)ZSTD_customCalloc(DDICT_HASHSET_TABLE_BASE_SIZE * sizeof(ZSTD_DDict*), customMem); in ZSTD_createDDictHashSet()
186 ZSTD_customFree(ret, customMem); in ZSTD_createDDictHashSet()
197 static void ZSTD_freeDDictHashSet(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { in ZSTD_freeDDictHashSet() argument
200 ZSTD_customFree((void*)hashSet->ddictPtrTable, customMem); in ZSTD_freeDDictHashSet()
203 ZSTD_customFree(hashSet, customMem); in ZSTD_freeDDictHashSet()
[all …]
H A Dzstd_decompress_internal.h153 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.c131 static size_t ZSTD_DDictHashSet_expand(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { in ZSTD_DDictHashSet_expand() argument
133 …** newTable = (const ZSTD_DDict**)ZSTD_customCalloc(sizeof(ZSTD_DDict*) * newTableSize, customMem); in ZSTD_DDictHashSet_expand()
148 ZSTD_customFree((void*)oldTable, customMem); in ZSTD_DDictHashSet_expand()
178 static ZSTD_DDictHashSet* ZSTD_createDDictHashSet(ZSTD_customMem customMem) { in ZSTD_createDDictHashSet() argument
179 …TD_DDictHashSet* ret = (ZSTD_DDictHashSet*)ZSTD_customMalloc(sizeof(ZSTD_DDictHashSet), customMem); in ZSTD_createDDictHashSet()
183 …nst ZSTD_DDict**)ZSTD_customCalloc(DDICT_HASHSET_TABLE_BASE_SIZE * sizeof(ZSTD_DDict*), customMem); in ZSTD_createDDictHashSet()
185 ZSTD_customFree(ret, customMem); in ZSTD_createDDictHashSet()
196 static void ZSTD_freeDDictHashSet(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { in ZSTD_freeDDictHashSet() argument
199 ZSTD_customFree((void*)hashSet->ddictPtrTable, customMem); in ZSTD_freeDDictHashSet()
202 ZSTD_customFree(hashSet, customMem); in ZSTD_freeDDictHashSet()
[all …]
H A Dzstd_decompress_internal.h152 ZSTD_customMem customMem; member
/freebsd/sys/contrib/zstd/lib/deprecated/
H A Dzbuff_decompress.c27 ZBUFF_DCtx* ZBUFF_createDCtx_advanced(ZSTD_customMem customMem) in ZBUFF_createDCtx_advanced() argument
29 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/zstd/lib/compress/
H A Dzstd_cwksp.h689 MEM_STATIC size_t ZSTD_cwksp_create(ZSTD_cwksp* ws, size_t size, ZSTD_customMem customMem) { in ZSTD_cwksp_create() argument
690 void* workspace = ZSTD_customMalloc(size, customMem); in ZSTD_cwksp_create()
697 MEM_STATIC void ZSTD_cwksp_free(ZSTD_cwksp* ws, ZSTD_customMem customMem) { in ZSTD_cwksp_free() argument
701 if (ptr != NULL && customMem.customFree != NULL) { in ZSTD_cwksp_free()
706 ZSTD_customFree(ptr, customMem); in ZSTD_cwksp_free()
H A Dzstd_compress.c88 ZSTD_customMem customMem; member
106 cctx->customMem = memManager; in ZSTD_initCCtx()
114 ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem) in ZSTD_createCCtx_advanced() argument
118 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createCCtx_advanced()
119 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_customMalloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced()
121 ZSTD_initCCtx(cctx, customMem); in ZSTD_createCCtx_advanced()
156 ZSTD_customFree(cctx->localDict.dictBuffer, cctx->customMem); in ZSTD_clearAllDicts()
178 ZSTD_cwksp_free(&cctx->workspace, cctx->customMem); in ZSTD_freeCCtxContent()
189 if (!cctxInWorkspace) ZSTD_customFree(cctx, cctx->customMem); in ZSTD_freeCCtx()
329 ZSTD_customMem customMem) in ZSTD_createCCtxParams_advanced() argument
[all …]
H A Dzstd_compress_internal.h423 ZSTD_customMem customMem; member
488 ZSTD_customMem customMem; member
/freebsd/sys/contrib/openzfs/module/zstd/lib/compress/
H A Dzstd_cwksp.h690 MEM_STATIC size_t ZSTD_cwksp_create(ZSTD_cwksp* ws, size_t size, ZSTD_customMem customMem) { in ZSTD_cwksp_create() argument
691 void* workspace = ZSTD_customMalloc(size, customMem); in ZSTD_cwksp_create()
698 MEM_STATIC void ZSTD_cwksp_free(ZSTD_cwksp* ws, ZSTD_customMem customMem) { in ZSTD_cwksp_free() argument
702 if (ptr != NULL && customMem.customFree != NULL) { in ZSTD_cwksp_free()
707 ZSTD_customFree(ptr, customMem); in ZSTD_cwksp_free()
H A Dzstd_compress.c89 ZSTD_customMem customMem; member
107 cctx->customMem = memManager; in ZSTD_initCCtx()
115 ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem) in ZSTD_createCCtx_advanced() argument
119 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createCCtx_advanced()
120 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_customMalloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced()
122 ZSTD_initCCtx(cctx, customMem); in ZSTD_createCCtx_advanced()
157 ZSTD_customFree(cctx->localDict.dictBuffer, cctx->customMem); in ZSTD_clearAllDicts()
179 ZSTD_cwksp_free(&cctx->workspace, cctx->customMem); in ZSTD_freeCCtxContent()
190 if (!cctxInWorkspace) ZSTD_customFree(cctx, cctx->customMem); in ZSTD_freeCCtx()
330 ZSTD_customMem customMem) in ZSTD_createCCtxParams_advanced() argument
[all …]
H A Dzstd_compress_internal.h424 ZSTD_customMem customMem; member
489 ZSTD_customMem customMem; member
/freebsd/sys/contrib/openzfs/module/zstd/lib/
H A Dzstd.h1886 ZSTDLIB_STATIC_API ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem);
1887 ZSTDLIB_STATIC_API ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem);
1888 ZSTDLIB_STATIC_API ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem);
1889 ZSTDLIB_STATIC_API ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem);
1895 ZSTD_customMem customMem);
1921 ZSTD_customMem customMem);
1927 ZSTD_customMem customMem);
/freebsd/sys/contrib/zstd/lib/
H A Dzstd.h1885 ZSTDLIB_STATIC_API ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem);
1886 ZSTDLIB_STATIC_API ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem);
1887 ZSTDLIB_STATIC_API ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem);
1888 ZSTDLIB_STATIC_API ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem);
1894 ZSTD_customMem customMem);
1920 ZSTD_customMem customMem);
1926 ZSTD_customMem customMem);

12