Lines Matching refs:customMem

123 static size_t ZSTD_DDictHashSet_expand(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) {
125 const ZSTD_DDict** newTable = (const ZSTD_DDict**)ZSTD_customCalloc(sizeof(ZSTD_DDict*) * newTableSize, customMem);
140 ZSTD_customFree((void*)oldTable, customMem);
170 static ZSTD_DDictHashSet* ZSTD_createDDictHashSet(ZSTD_customMem customMem) {
171 ZSTD_DDictHashSet* ret = (ZSTD_DDictHashSet*)ZSTD_customMalloc(sizeof(ZSTD_DDictHashSet), customMem);
175 ret->ddictPtrTable = (const ZSTD_DDict**)ZSTD_customCalloc(DDICT_HASHSET_TABLE_BASE_SIZE * sizeof(ZSTD_DDict*), customMem);
177 ZSTD_customFree(ret, customMem);
188 static void ZSTD_freeDDictHashSet(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) {
191 ZSTD_customFree((void*)hashSet->ddictPtrTable, customMem);
194 ZSTD_customFree(hashSet, customMem);
201 static size_t ZSTD_DDictHashSet_addDDict(ZSTD_DDictHashSet* hashSet, const ZSTD_DDict* ddict, ZSTD_customMem customMem) {
204 FORWARD_IF_ERROR(ZSTD_DDictHashSet_expand(hashSet, customMem), "");
279 static ZSTD_DCtx* ZSTD_createDCtx_internal(ZSTD_customMem customMem) {
280 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL;
282 { ZSTD_DCtx* const dctx = (ZSTD_DCtx*)ZSTD_customMalloc(sizeof(*dctx), customMem);
284 dctx->customMem = customMem;
290 ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem)
292 return ZSTD_createDCtx_internal(customMem);
313 { ZSTD_customMem const cMem = dctx->customMem;
1514 ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem)
1516 return ZSTD_createDCtx_internal(customMem);
1538 dctx->ddictLocal = ZSTD_createDDict_advanced(dict, dictSize, dictLoadMethod, dictContentType, dctx->customMem);
1616 dctx->ddictSet = ZSTD_createDDictHashSet(dctx->customMem);
1622 FORWARD_IF_ERROR(ZSTD_DDictHashSet_addDDict(dctx->ddictSet, ddict, dctx->customMem), "");
2013 ZSTD_customFree(zds->inBuff, zds->customMem);
2016 zds->inBuff = (char*)ZSTD_customMalloc(bufferSize, zds->customMem);