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

Function ZSTD_cwksp_create

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

Source from the content-addressed store, hash-verified

9670}
9671
9672MEM_STATIC size_t ZSTD_cwksp_create(ZSTD_cwksp* ws, size_t size, ZSTD_customMem customMem) {
9673 void* workspace = ZSTD_malloc(size, customMem);
9674 DEBUGLOG(4, "cwksp: creating new workspace with %zd bytes", size);
9675 RETURN_ERROR_IF(workspace == NULL, memory_allocation, "NULL pointer!");
9676 ZSTD_cwksp_init(ws, workspace, size);
9677 return 0;
9678}
9679
9680MEM_STATIC void ZSTD_cwksp_free(ZSTD_cwksp* ws, ZSTD_customMem customMem) {
9681 void *ptr = ws->workspace;

Callers 1

ZSTD_resetCCtx_internalFunction · 0.70

Calls 2

ZSTD_mallocFunction · 0.85
ZSTD_cwksp_initFunction · 0.70

Tested by

no test coverage detected