Home
last modified time | relevance | path

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

/linux/lib/zstd/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()
/linux/lib/zstd/decompress/
H A Dzstd_ddict.c146 ZSTD_customMem customMem) in ZSTD_createDDict_advanced() argument
148 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createDDict_advanced()
150 { ZSTD_DDict* const ddict = (ZSTD_DDict*) ZSTD_customMalloc(sizeof(ZSTD_DDict), customMem); in ZSTD_createDDict_advanced()
152 ddict->cMem = customMem; in ZSTD_createDDict_advanced()
H A Dzstd_decompress.c126 static size_t ZSTD_DDictHashSet_expand(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { in ZSTD_DDictHashSet_expand() argument
128 …** newTable = (const ZSTD_DDict**)ZSTD_customCalloc(sizeof(ZSTD_DDict*) * newTableSize, customMem); in ZSTD_DDictHashSet_expand()
143 ZSTD_customFree((void*)oldTable, customMem); in ZSTD_DDictHashSet_expand()
173 static ZSTD_DDictHashSet* ZSTD_createDDictHashSet(ZSTD_customMem customMem) { in ZSTD_createDDictHashSet() argument
174 …TD_DDictHashSet* ret = (ZSTD_DDictHashSet*)ZSTD_customMalloc(sizeof(ZSTD_DDictHashSet), customMem); in ZSTD_createDDictHashSet()
178 …nst ZSTD_DDict**)ZSTD_customCalloc(DDICT_HASHSET_TABLE_BASE_SIZE * sizeof(ZSTD_DDict*), customMem); in ZSTD_createDDictHashSet()
180 ZSTD_customFree(ret, customMem); in ZSTD_createDDictHashSet()
191 static void ZSTD_freeDDictHashSet(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { in ZSTD_freeDDictHashSet() argument
194 ZSTD_customFree((void*)hashSet->ddictPtrTable, customMem); in ZSTD_freeDDictHashSet()
197 ZSTD_customFree(hashSet, customMem); in ZSTD_freeDDictHashSet()
[all …]
H A Dzstd_decompress_internal.h153 ZSTD_customMem customMem; member
/linux/lib/zstd/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.c86 ZSTD_customMem customMem; member
104 cctx->customMem = memManager; in ZSTD_initCCtx()
112 ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem) in ZSTD_createCCtx_advanced() argument
116 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createCCtx_advanced()
117 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_customMalloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced()
119 ZSTD_initCCtx(cctx, customMem); in ZSTD_createCCtx_advanced()
154 ZSTD_customFree(cctx->localDict.dictBuffer, cctx->customMem); in ZSTD_clearAllDicts()
173 ZSTD_cwksp_free(&cctx->workspace, cctx->customMem); in ZSTD_freeCCtxContent()
184 if (!cctxInWorkspace) ZSTD_customFree(cctx, cctx->customMem); in ZSTD_freeCCtx()
324 ZSTD_customMem customMem) in ZSTD_createCCtxParams_advanced() argument
[all …]
H A Dzstd_compress_internal.h421 ZSTD_customMem customMem; member
486 ZSTD_customMem customMem; member
/linux/include/linux/
H A Dzstd_lib.h1850 ZSTDLIB_STATIC_API ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem);
1851 ZSTDLIB_STATIC_API ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem);
1852 ZSTDLIB_STATIC_API ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem);
1853 ZSTDLIB_STATIC_API ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem);
1859 ZSTD_customMem customMem);
1885 ZSTD_customMem customMem);
1891 ZSTD_customMem customMem);