Home
last modified time | relevance | path

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

/linux-5.19.10/lib/zstd/common/
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()
Dzstd_internal.h398 void* ZSTD_customMalloc(size_t size, ZSTD_customMem customMem);
399 void* ZSTD_customCalloc(size_t size, ZSTD_customMem customMem);
400 void ZSTD_customFree(void* ptr, ZSTD_customMem customMem);
/linux-5.19.10/lib/zstd/decompress/
Dzstd_ddict.c145 ZSTD_customMem customMem) in ZSTD_createDDict_advanced() argument
147 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createDDict_advanced()
149 { ZSTD_DDict* const ddict = (ZSTD_DDict*) ZSTD_customMalloc(sizeof(ZSTD_DDict), customMem); in ZSTD_createDDict_advanced()
151 ddict->cMem = customMem; in ZSTD_createDDict_advanced()
Dzstd_decompress.c124 static size_t ZSTD_DDictHashSet_expand(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { in ZSTD_DDictHashSet_expand() argument
126 …** newTable = (const ZSTD_DDict**)ZSTD_customCalloc(sizeof(ZSTD_DDict*) * newTableSize, customMem); in ZSTD_DDictHashSet_expand()
141 ZSTD_customFree((void*)oldTable, customMem); in ZSTD_DDictHashSet_expand()
171 static ZSTD_DDictHashSet* ZSTD_createDDictHashSet(ZSTD_customMem customMem) { in ZSTD_createDDictHashSet() argument
172 …TD_DDictHashSet* ret = (ZSTD_DDictHashSet*)ZSTD_customMalloc(sizeof(ZSTD_DDictHashSet), customMem); in ZSTD_createDDictHashSet()
176 …nst ZSTD_DDict**)ZSTD_customCalloc(DDICT_HASHSET_TABLE_BASE_SIZE * sizeof(ZSTD_DDict*), customMem); in ZSTD_createDDictHashSet()
178 ZSTD_customFree(ret, customMem); in ZSTD_createDDictHashSet()
189 static void ZSTD_freeDDictHashSet(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { in ZSTD_freeDDictHashSet() argument
192 ZSTD_customFree((void*)hashSet->ddictPtrTable, customMem); in ZSTD_freeDDictHashSet()
195 ZSTD_customFree(hashSet, customMem); in ZSTD_freeDDictHashSet()
[all …]
Dzstd_decompress_internal.h135 ZSTD_customMem customMem; member
/linux-5.19.10/lib/zstd/compress/
Dzstd_cwksp.h413 MEM_STATIC size_t ZSTD_cwksp_create(ZSTD_cwksp* ws, size_t size, ZSTD_customMem customMem) { in ZSTD_cwksp_create() argument
414 void* workspace = ZSTD_customMalloc(size, customMem); in ZSTD_cwksp_create()
421 MEM_STATIC void ZSTD_cwksp_free(ZSTD_cwksp* ws, ZSTD_customMem customMem) { in ZSTD_cwksp_free() argument
425 ZSTD_customFree(ptr, customMem); in ZSTD_cwksp_free()
Dzstd_compress.c69 ZSTD_customMem customMem; member
83 cctx->customMem = memManager; in ZSTD_initCCtx()
91 ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem) in ZSTD_createCCtx_advanced() argument
95 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createCCtx_advanced()
96 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_customMalloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced()
98 ZSTD_initCCtx(cctx, customMem); in ZSTD_createCCtx_advanced()
132 ZSTD_customFree(cctx->localDict.dictBuffer, cctx->customMem); in ZSTD_clearAllDicts()
151 ZSTD_cwksp_free(&cctx->workspace, cctx->customMem); in ZSTD_freeCCtxContent()
163 ZSTD_customFree(cctx, cctx->customMem); in ZSTD_freeCCtx()
225 ZSTD_customMem customMem) in ZSTD_createCCtxParams_advanced() argument
[all …]
Dzstd_compress_internal.h253 ZSTD_customMem customMem; member
284 ZSTD_customMem customMem; member
/linux-5.19.10/include/linux/
Dzstd_lib.h1507 ZSTDLIB_API ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem);
1508 ZSTDLIB_API ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem);
1509 ZSTDLIB_API ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem);
1510 ZSTDLIB_API ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem);
1516 ZSTD_customMem customMem);
1542 ZSTD_customMem customMem);
1548 ZSTD_customMem customMem);