Lines Matching defs:cmem

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