MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ZSTD_createCCtx_advanced

Function ZSTD_createCCtx_advanced

freebsd/contrib/openzfs/module/zstd/lib/zstd.c:13165–13175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13163}
13164
13165ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem)
13166{
13167 ZSTD_STATIC_ASSERT(zcss_init==0);
13168 ZSTD_STATIC_ASSERT(ZSTD_CONTENTSIZE_UNKNOWN==(0ULL - 1));
13169 if (!customMem.customAlloc ^ !customMem.customFree) return NULL;
13170 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_malloc(sizeof(ZSTD_CCtx), customMem);
13171 if (!cctx) return NULL;
13172 ZSTD_initCCtx(cctx, customMem);
13173 return cctx;
13174 }
13175}
13176
13177ZSTD_CCtx* ZSTD_initStaticCCtx(void* workspace, size_t workspaceSize)
13178{

Callers 3

ZSTD_createCCtxFunction · 0.70
zfs_zstd_compressFunction · 0.50

Calls 2

ZSTD_mallocFunction · 0.85
ZSTD_initCCtxFunction · 0.70

Tested by

no test coverage detected