Lines Matching refs:cmem
100 static void* LZ4F_calloc(size_t s, LZ4F_CustomMem cmem) in LZ4F_calloc() argument
103 if (cmem.customCalloc != NULL) { in LZ4F_calloc()
104 return cmem.customCalloc(cmem.opaqueState, s); in LZ4F_calloc()
107 if (cmem.customAlloc == NULL) { in LZ4F_calloc()
111 { void* const p = cmem.customAlloc(cmem.opaqueState, s); in LZ4F_calloc()
116 static void* LZ4F_malloc(size_t s, LZ4F_CustomMem cmem) in LZ4F_malloc() argument
119 if (cmem.customAlloc != NULL) { in LZ4F_malloc()
120 return cmem.customAlloc(cmem.opaqueState, s); in LZ4F_malloc()
126 static void LZ4F_free(void* p, LZ4F_CustomMem cmem) in LZ4F_free() argument
129 if (cmem.customFree != NULL) { in LZ4F_free()
130 cmem.customFree(cmem.opaqueState, p); in LZ4F_free()
264 LZ4F_CustomMem cmem; member
511 LZ4F_free(cctxPtr->lz4CtxPtr, cctxPtr->cmem); in LZ4F_compressFrame()
523 LZ4F_CustomMem cmem; member
530 LZ4F_createCDict_advanced(LZ4F_CustomMem cmem, const void* dictBuffer, size_t dictSize) in LZ4F_createCDict_advanced() argument
533 LZ4F_CDict* const cdict = (LZ4F_CDict*)LZ4F_malloc(sizeof(*cdict), cmem); in LZ4F_createCDict_advanced()
536 cdict->cmem = cmem; in LZ4F_createCDict_advanced()
541 cdict->dictContent = LZ4F_malloc(dictSize, cmem); in LZ4F_createCDict_advanced()
542 cdict->fastCtx = (LZ4_stream_t*)LZ4F_malloc(sizeof(LZ4_stream_t), cmem); in LZ4F_createCDict_advanced()
545 cdict->HCCtx = (LZ4_streamHC_t*)LZ4F_malloc(sizeof(LZ4_streamHC_t), cmem); in LZ4F_createCDict_advanced()
574 LZ4F_free(cdict->dictContent, cdict->cmem); in LZ4F_freeCDict()
575 LZ4F_free(cdict->fastCtx, cdict->cmem); in LZ4F_freeCDict()
576 LZ4F_free(cdict->HCCtx, cdict->cmem); in LZ4F_freeCDict()
577 LZ4F_free(cdict, cdict->cmem); in LZ4F_freeCDict()
592 cctxPtr->cmem = customMem; in LZ4F_createCompressionContext_advanced()
623 …LZ4F_free(cctxPtr->lz4CtxPtr, cctxPtr->cmem); /* note: LZ4_streamHC_t and LZ4_stream_t are simple… in LZ4F_freeCompressionContext()
624 LZ4F_free(cctxPtr->tmpBuff, cctxPtr->cmem); in LZ4F_freeCompressionContext()
625 LZ4F_free(cctxPtr, cctxPtr->cmem); in LZ4F_freeCompressionContext()
696 LZ4F_free(cctxPtr->lz4CtxPtr, cctxPtr->cmem); in LZ4F_compressBegin_usingCDict()
700 cctxPtr->lz4CtxPtr = LZ4F_malloc(sizeof(LZ4_stream_t), cctxPtr->cmem); in LZ4F_compressBegin_usingCDict()
704 cctxPtr->lz4CtxPtr = LZ4F_malloc(sizeof(LZ4_streamHC_t), cctxPtr->cmem); in LZ4F_compressBegin_usingCDict()
734 LZ4F_free(cctxPtr->tmpBuff, cctxPtr->cmem); in LZ4F_compressBegin_usingCDict()
735 cctxPtr->tmpBuff = (BYTE*)LZ4F_calloc(requiredBuffSize, cctxPtr->cmem); in LZ4F_compressBegin_usingCDict()
1207 LZ4F_CustomMem cmem; member
1235 dctx->cmem = customMem; in LZ4F_createDecompressionContext_advanced()
1264 LZ4F_free(dctx->tmpIn, dctx->cmem); in LZ4F_freeDecompressionContext()
1265 LZ4F_free(dctx->tmpOutBuffer, dctx->cmem); in LZ4F_freeDecompressionContext()
1266 LZ4F_free(dctx, dctx->cmem); in LZ4F_freeDecompressionContext()
1627 LZ4F_free(dctx->tmpIn, dctx->cmem); in LZ4F_decompress()
1628 … dctx->tmpIn = (BYTE*)LZ4F_malloc(dctx->maxBlockSize + BFSize /* block checksum */, dctx->cmem); in LZ4F_decompress()
1630 LZ4F_free(dctx->tmpOutBuffer, dctx->cmem); in LZ4F_decompress()
1631 dctx->tmpOutBuffer= (BYTE*)LZ4F_malloc(bufferNeeded, dctx->cmem); in LZ4F_decompress()