Home
last modified time | relevance | path

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

/external/zstd/lib/compress/
Dzstdmt_compress.c362 ZSTDMT_CCtxPool* const cctxPool = (ZSTDMT_CCtxPool*) ZSTD_customCalloc( in ZSTDMT_createCCtxPool() local
365 if (!cctxPool) return NULL; in ZSTDMT_createCCtxPool()
366 if (ZSTD_pthread_mutex_init(&cctxPool->poolMutex, NULL)) { in ZSTDMT_createCCtxPool()
367 ZSTD_customFree(cctxPool, cMem); in ZSTDMT_createCCtxPool()
370 cctxPool->cMem = cMem; in ZSTDMT_createCCtxPool()
371 cctxPool->totalCCtx = nbWorkers; in ZSTDMT_createCCtxPool()
372 cctxPool->availCCtx = 1; /* at least one cctx for single-thread mode */ in ZSTDMT_createCCtxPool()
373 cctxPool->cctx[0] = ZSTD_createCCtx_advanced(cMem); in ZSTDMT_createCCtxPool()
374 if (!cctxPool->cctx[0]) { ZSTDMT_freeCCtxPool(cctxPool); return NULL; } in ZSTDMT_createCCtxPool()
376 return cctxPool; in ZSTDMT_createCCtxPool()
[all …]