/external/zstd/lib/common/ |
D | zstd_common.c | 56 void* ZSTD_customMalloc(size_t size, ZSTD_customMem customMem) in ZSTD_customMalloc() argument 58 if (customMem.customAlloc) in ZSTD_customMalloc() 59 return customMem.customAlloc(customMem.opaque, size); in ZSTD_customMalloc() 63 void* ZSTD_customCalloc(size_t size, ZSTD_customMem customMem) in ZSTD_customCalloc() argument 65 if (customMem.customAlloc) { in ZSTD_customCalloc() 68 void* const ptr = customMem.customAlloc(customMem.opaque, size); in ZSTD_customCalloc() 75 void ZSTD_customFree(void* ptr, ZSTD_customMem customMem) in ZSTD_customFree() argument 78 if (customMem.customFree) in ZSTD_customFree() 79 customMem.customFree(customMem.opaque, ptr); in ZSTD_customFree()
|
D | pool.c | 35 ZSTD_customMem customMem; member 117 ZSTD_customMem customMem) { in POOL_create_advanced() argument 122 ctx = (POOL_ctx*)ZSTD_customCalloc(sizeof(POOL_ctx), customMem); in POOL_create_advanced() 129 ctx->queue = (POOL_job*)ZSTD_customMalloc(ctx->queueSize * sizeof(POOL_job), customMem); in POOL_create_advanced() 143 … ctx->threads = (ZSTD_pthread_t*)ZSTD_customMalloc(numThreads * sizeof(ZSTD_pthread_t), customMem); in POOL_create_advanced() 145 ctx->customMem = customMem; in POOL_create_advanced() 186 ZSTD_customFree(ctx->queue, ctx->customMem); in POOL_free() 187 ZSTD_customFree(ctx->threads, ctx->customMem); in POOL_free() 188 ZSTD_customFree(ctx, ctx->customMem); in POOL_free() 212 …readPool = (ZSTD_pthread_t*)ZSTD_customMalloc(numThreads * sizeof(ZSTD_pthread_t), ctx->customMem); in POOL_resize_internal() [all …]
|
D | zstd_internal.h | 414 void* ZSTD_customMalloc(size_t size, ZSTD_customMem customMem); 415 void* ZSTD_customCalloc(size_t size, ZSTD_customMem customMem); 416 void ZSTD_customFree(void* ptr, ZSTD_customMem customMem);
|
D | pool.h | 34 ZSTD_customMem customMem);
|
/external/zstd/zlibWrapper/ |
D | zstd_zlibwrapper.c | 121 static void* ZWRAP_customMalloc(size_t size, ZSTD_customMem customMem) in ZWRAP_customMalloc() argument 123 if (customMem.customAlloc) in ZWRAP_customMalloc() 124 return customMem.customAlloc(customMem.opaque, size); in ZWRAP_customMalloc() 128 static void* ZWRAP_customCalloc(size_t size, ZSTD_customMem customMem) in ZWRAP_customCalloc() argument 130 if (customMem.customAlloc) { in ZWRAP_customCalloc() 133 void* const ptr = customMem.customAlloc(customMem.opaque, size); in ZWRAP_customCalloc() 140 static void ZWRAP_customFree(void* ptr, ZSTD_customMem customMem) in ZWRAP_customFree() argument 143 if (customMem.customFree) in ZWRAP_customFree() 144 customMem.customFree(customMem.opaque, ptr); in ZWRAP_customFree() 160 ZSTD_customMem customMem; member [all …]
|
/external/zstd/lib/legacy/ |
D | zstd_v07.c | 78 ZSTDLIBv07_API ZSTDv07_DCtx* ZSTDv07_createDCtx_advanced(ZSTDv07_customMem customMem); 2954 ZSTDv07_customMem customMem; member 2981 ZSTDv07_DCtx* ZSTDv07_createDCtx_advanced(ZSTDv07_customMem customMem) in ZSTDv07_createDCtx_advanced() argument 2985 if (!customMem.customAlloc && !customMem.customFree) in ZSTDv07_createDCtx_advanced() 2986 customMem = defaultCustomMem; in ZSTDv07_createDCtx_advanced() 2988 if (!customMem.customAlloc || !customMem.customFree) in ZSTDv07_createDCtx_advanced() 2991 dctx = (ZSTDv07_DCtx*) customMem.customAlloc(customMem.opaque, sizeof(ZSTDv07_DCtx)); in ZSTDv07_createDCtx_advanced() 2993 memcpy(&dctx->customMem, &customMem, sizeof(ZSTDv07_customMem)); in ZSTDv07_createDCtx_advanced() 3006 dctx->customMem.customFree(dctx->customMem.opaque, dctx); in ZSTDv07_freeDCtx() 4190 …DDict* ZSTDv07_createDDict_advanced(const void* dict, size_t dictSize, ZSTDv07_customMem customMem) in ZSTDv07_createDDict_advanced() argument [all …]
|
/external/zstd/lib/decompress/ |
D | zstd_ddict.c | 148 ZSTD_customMem customMem) in ZSTD_createDDict_advanced() argument 150 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createDDict_advanced() 152 { ZSTD_DDict* const ddict = (ZSTD_DDict*) ZSTD_customMalloc(sizeof(ZSTD_DDict), customMem); in ZSTD_createDDict_advanced() 154 ddict->cMem = customMem; in ZSTD_createDDict_advanced()
|
D | zstd_decompress.c | 143 ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem) in ZSTD_createDCtx_advanced() argument 145 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createDCtx_advanced() 147 { ZSTD_DCtx* const dctx = (ZSTD_DCtx*)ZSTD_customMalloc(sizeof(*dctx), customMem); in ZSTD_createDCtx_advanced() 149 dctx->customMem = customMem; in ZSTD_createDCtx_advanced() 173 { ZSTD_customMem const cMem = dctx->customMem; in ZSTD_freeDCtx() 1294 ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem) in ZSTD_createDStream_advanced() argument 1296 return ZSTD_createDCtx_advanced(customMem); in ZSTD_createDStream_advanced() 1318 …ocal = ZSTD_createDDict_advanced(dict, dictSize, dictLoadMethod, dictContentType, dctx->customMem); in ZSTD_DCtx_loadDictionary_advanced() 1793 ZSTD_customFree(zds->inBuff, zds->customMem); in ZSTD_decompressStream() 1796 zds->inBuff = (char*)ZSTD_customMalloc(bufferSize, zds->customMem); in ZSTD_decompressStream()
|
D | zstd_decompress_internal.h | 127 ZSTD_customMem customMem; member
|
/external/zstd/lib/deprecated/ |
D | zbuff_decompress.c | 25 ZBUFF_DCtx* ZBUFF_createDCtx_advanced(ZSTD_customMem customMem) in ZBUFF_createDCtx_advanced() argument 27 return ZSTD_createDStream_advanced(customMem); in ZBUFF_createDCtx_advanced()
|
D | zbuff_compress.c | 58 ZBUFF_CCtx* ZBUFF_createCCtx_advanced(ZSTD_customMem customMem) in ZBUFF_createCCtx_advanced() argument 60 return ZSTD_createCStream_advanced(customMem); in ZBUFF_createCCtx_advanced()
|
D | zbuff.h | 195 …"use ZSTD_createCStream_advanced") ZBUFF_CCtx* ZBUFF_createCCtx_advanced(ZSTD_customMem customMem); 199 …"use ZSTD_createDStream_advanced") ZBUFF_DCtx* ZBUFF_createDCtx_advanced(ZSTD_customMem customMem);
|
/external/zstd/lib/ |
D | zstd.h | 1490 ZSTDLIB_API ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem); 1491 ZSTDLIB_API ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem); 1492 ZSTDLIB_API ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem); 1493 ZSTDLIB_API ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem); 1499 ZSTD_customMem customMem); 1524 ZSTD_customMem customMem); 1529 ZSTD_customMem customMem);
|
/external/zstd/lib/compress/ |
D | zstd_cwksp.h | 489 MEM_STATIC size_t ZSTD_cwksp_create(ZSTD_cwksp* ws, size_t size, ZSTD_customMem customMem) { in ZSTD_cwksp_create() argument 490 void* workspace = ZSTD_customMalloc(size, customMem); in ZSTD_cwksp_create() 497 MEM_STATIC void ZSTD_cwksp_free(ZSTD_cwksp* ws, ZSTD_customMem customMem) { in ZSTD_cwksp_free() argument 501 ZSTD_customFree(ptr, customMem); in ZSTD_cwksp_free()
|
D | zstd_compress.c | 72 ZSTD_customMem customMem; member 86 cctx->customMem = memManager; in ZSTD_initCCtx() 94 ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem) in ZSTD_createCCtx_advanced() argument 98 if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; in ZSTD_createCCtx_advanced() 99 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_customMalloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced() 101 ZSTD_initCCtx(cctx, customMem); in ZSTD_createCCtx_advanced() 135 ZSTD_customFree(cctx->localDict.dictBuffer, cctx->customMem); in ZSTD_clearAllDicts() 157 ZSTD_cwksp_free(&cctx->workspace, cctx->customMem); in ZSTD_freeCCtxContent() 169 ZSTD_customFree(cctx, cctx->customMem); in ZSTD_freeCCtx() 235 ZSTD_customMem customMem) in ZSTD_createCCtxParams_advanced() argument [all …]
|
D | zstd_compress_internal.h | 250 ZSTD_customMem customMem; member 280 ZSTD_customMem customMem; member
|
D | zstdmt_compress.c | 484 ZSTD_customMem cMem = params.customMem; in ZSTDMT_serialState_reset() 547 ZSTD_customMem cMem = serialState->params.customMem; in ZSTDMT_serialState_free()
|
/external/zstd/tests/ |
D | zbufftest.c | 121 static int basicUnitTests(U32 seed, double compressibility, ZSTD_customMem customMem) in basicUnitTests() argument 133 ZBUFF_CCtx* zc = ZBUFF_createCCtx_advanced(customMem); in basicUnitTests() 134 ZBUFF_DCtx* zd = ZBUFF_createDCtx_advanced(customMem); in basicUnitTests() 504 ZSTD_customMem customMem = { ZBUFF_allocFunction, ZBUFF_freeFunction, NULL }; in main() local 612 …result = basicUnitTests(0, ((double)proba) / 100, customMem); /* use custom memory allocation fun… in main()
|
D | fuzzer.c | 497 ZSTD_customMem customMem) = ZSTD_createDStream_advanced; in basicUnitTests()
|