Home
last modified time | relevance | path

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

12

/src/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);
/src/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);
/src/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 …]
/src/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 …]
/src/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
/src/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
/src/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()
/src/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 …]
/src/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);
/src/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 …]
H A Dzstd_compress_internal.h332 ZSTD_customMem customMem; member
380 ZSTD_customMem customMem; member
/src/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);

12