| /freebsd/sys/contrib/openzfs/module/zstd/lib/common/ |
| H A D | allocations.h | 27 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 D | pool.c | 36 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 D | pool.h | 31 ZSTD_customMem customMem);
|
| /freebsd/sys/contrib/zstd/lib/common/ |
| H A D | allocations.h | 26 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 D | pool.c | 35 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 D | pool.h | 30 ZSTD_customMem customMem);
|
| /freebsd/sys/contrib/zstd/zlibWrapper/ |
| H A D | zstd_zlibwrapper.c | 121 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 D | zstd_v07.c | 79 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 D | zstd_ddict.c | 149 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 D | zstd_decompress.c | 132 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 D | zstd_decompress_internal.h | 153 ZSTD_customMem customMem; member
|
| /freebsd/sys/contrib/zstd/lib/decompress/ |
| H A D | zstd_ddict.c | 148 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 D | zstd_decompress.c | 131 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 D | zstd_decompress_internal.h | 152 ZSTD_customMem customMem; member
|
| /freebsd/sys/contrib/zstd/lib/deprecated/ |
| H A D | zbuff_decompress.c | 27 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 D | zbuff.h | 195 …"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 D | zbuff_compress.c | 59 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 D | zstd_cwksp.h | 689 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 D | zstd_compress.c | 88 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 D | zstd_compress_internal.h | 423 ZSTD_customMem customMem; member 488 ZSTD_customMem customMem; member
|
| /freebsd/sys/contrib/openzfs/module/zstd/lib/compress/ |
| H A D | zstd_cwksp.h | 690 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 D | zstd_compress.c | 89 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 D | zstd_compress_internal.h | 424 ZSTD_customMem customMem; member 489 ZSTD_customMem customMem; member
|
| /freebsd/sys/contrib/openzfs/module/zstd/lib/ |
| H A D | zstd.h | 1886 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 D | zstd.h | 1885 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);
|