Lines Matching refs:customMem
4462 ZSTDLIB_API ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem);
4463 ZSTDLIB_API ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem);
4464 ZSTDLIB_API ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem);
4465 ZSTDLIB_API ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem);
4471 ZSTD_customMem customMem);
4476 ZSTD_customMem customMem);
6683 void* ZSTD_malloc(size_t size, ZSTD_customMem customMem);
6684 void* ZSTD_calloc(size_t size, ZSTD_customMem customMem);
6685 void ZSTD_free(void* ptr, ZSTD_customMem customMem);
6779 ZSTD_customMem customMem);
7005 ZSTD_customMem customMem; member
7083 ZSTD_customMem customMem) { in POOL_create_advanced() argument
7088 ctx = (POOL_ctx*)ZSTD_calloc(sizeof(POOL_ctx), customMem); in POOL_create_advanced()
7095 ctx->queue = (POOL_job*)ZSTD_malloc(ctx->queueSize * sizeof(POOL_job), customMem); in POOL_create_advanced()
7109 ctx->threads = (ZSTD_pthread_t*)ZSTD_malloc(numThreads * sizeof(ZSTD_pthread_t), customMem); in POOL_create_advanced()
7111 ctx->customMem = customMem; in POOL_create_advanced()
7152 ZSTD_free(ctx->queue, ctx->customMem); in POOL_free()
7153 ZSTD_free(ctx->threads, ctx->customMem); in POOL_free()
7154 ZSTD_free(ctx, ctx->customMem); in POOL_free()
7176 …nst threadPool = (ZSTD_pthread_t*)ZSTD_malloc(numThreads * sizeof(ZSTD_pthread_t), ctx->customMem); in POOL_resize_internal()
7180 ZSTD_free(ctx->threads, ctx->customMem); in POOL_resize_internal()
7280 POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customMem customMem) { in POOL_create_advanced() argument
7283 (void)customMem; in POOL_create_advanced()
7371 void* ZSTD_malloc(size_t size, ZSTD_customMem customMem) in ZSTD_malloc() argument
7373 if (customMem.customAlloc) in ZSTD_malloc()
7374 return customMem.customAlloc(customMem.opaque, size); in ZSTD_malloc()
7378 void* ZSTD_calloc(size_t size, ZSTD_customMem customMem) in ZSTD_calloc() argument
7380 if (customMem.customAlloc) { in ZSTD_calloc()
7383 void* const ptr = customMem.customAlloc(customMem.opaque, size); in ZSTD_calloc()
7390 void ZSTD_free(void* ptr, ZSTD_customMem customMem) in ZSTD_free() argument
7393 if (customMem.customFree) in ZSTD_free()
7394 customMem.customFree(customMem.opaque, ptr); in ZSTD_free()
9670 MEM_STATIC size_t ZSTD_cwksp_create(ZSTD_cwksp* ws, size_t size, ZSTD_customMem customMem) { in ZSTD_cwksp_create() argument
9671 void* workspace = ZSTD_malloc(size, customMem); in ZSTD_cwksp_create()
9678 MEM_STATIC void ZSTD_cwksp_free(ZSTD_cwksp* ws, ZSTD_customMem customMem) { in ZSTD_cwksp_free() argument
9682 ZSTD_free(ptr, customMem); in ZSTD_cwksp_free()
10141 ZSTD_customMem customMem; member
10158 ZSTD_customMem customMem; member
13141 ZSTD_customMem customMem; member
13155 cctx->customMem = memManager; in ZSTD_initCCtx()
13163 ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem) in ZSTD_createCCtx_advanced() argument
13167 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createCCtx_advanced()
13168 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_malloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced()
13170 ZSTD_initCCtx(cctx, customMem); in ZSTD_createCCtx_advanced()
13204 ZSTD_free(cctx->localDict.dictBuffer, cctx->customMem); in ZSTD_clearAllDicts()
13226 ZSTD_cwksp_free(&cctx->workspace, cctx->customMem); in ZSTD_freeCCtxContent()
13238 ZSTD_free(cctx, cctx->customMem); in ZSTD_freeCCtx()
13287 ZSTD_customMem customMem) in ZSTD_createCCtxParams_advanced() argument
13290 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createCCtxParams_advanced()
13292 sizeof(ZSTD_CCtx_params), customMem); in ZSTD_createCCtxParams_advanced()
13294 params->customMem = customMem; in ZSTD_createCCtxParams_advanced()
13308 ZSTD_free(params, params->customMem); in ZSTD_freeCCtxParams()
13967 cctx->customMem); in ZSTD_initLocalDict()
13988 void* dictBuffer = ZSTD_malloc(dictSize, cctx->customMem); in ZSTD_CCtx_loadDictionary_advanced()
14576 ZSTD_cwksp_free(ws, zc->customMem); in ZSTD_resetCCtx_internal()
14577 FORWARD_IF_ERROR(ZSTD_cwksp_create(ws, neededSpace, zc->customMem), ""); in ZSTD_resetCCtx_internal()
14860 memcpy(&dstCCtx->customMem, &srcCCtx->customMem, sizeof(ZSTD_customMem)); in ZSTD_copyCCtx_internal()
16489 ZSTD_compressionParameters cParams, ZSTD_customMem customMem) in ZSTD_createCDict_advanced() argument
16492 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createCDict_advanced()
16500 void* const workspace = ZSTD_malloc(workspaceSize, customMem); in ZSTD_createCDict_advanced()
16505 ZSTD_free(workspace, customMem); in ZSTD_createCDict_advanced()
16514 cdict->customMem = customMem; in ZSTD_createCDict_advanced()
16551 { ZSTD_customMem const cMem = cdict->customMem; in ZSTD_freeCDict()
16704 ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem) in ZSTD_createCStream_advanced() argument
16706 return ZSTD_createCCtx_advanced(customMem); in ZSTD_createCStream_advanced()
17078 cctx->mtctx = ZSTDMT_createCCtx_advanced((U32)params.nbWorkers, cctx->customMem); in ZSTD_compressStream2()
22747 ZSTD_customMem customMem; member
24346 ZSTD_customMem customMem) in ZSTD_createDDict_advanced() argument
24348 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createDDict_advanced()
24350 { ZSTD_DDict* const ddict = (ZSTD_DDict*) ZSTD_malloc(sizeof(ZSTD_DDict), customMem); in ZSTD_createDDict_advanced()
24352 ddict->cMem = customMem; in ZSTD_createDDict_advanced()
24639 ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem) in ZSTD_createDCtx_advanced() argument
24641 if (!customMem.customAlloc ^ !customMem.customFree) return NULL; in ZSTD_createDCtx_advanced()
24643 { ZSTD_DCtx* const dctx = (ZSTD_DCtx*)ZSTD_malloc(sizeof(*dctx), customMem); in ZSTD_createDCtx_advanced()
24645 dctx->customMem = customMem; in ZSTD_createDCtx_advanced()
24669 { ZSTD_customMem const cMem = dctx->customMem; in ZSTD_freeDCtx()
25780 ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem) in ZSTD_createDStream_advanced() argument
25782 return ZSTD_createDCtx_advanced(customMem); in ZSTD_createDStream_advanced()
25804 …ocal = ZSTD_createDDict_advanced(dict, dictSize, dictLoadMethod, dictContentType, dctx->customMem); in ZSTD_DCtx_loadDictionary_advanced()
26252 ZSTD_free(zds->inBuff, zds->customMem); in ZSTD_decompressStream()
26255 zds->inBuff = (char*)ZSTD_malloc(bufferSize, zds->customMem); in ZSTD_decompressStream()