From: Yann Collet Date: Wed, 1 Nov 2017 00:43:24 +0000 (-0700) Subject: removed direct call to malloc() from pool.c X-Git-Tag: v1.3.3^2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61e5a1adfc1645bf44e7c69a41c372b595202b22;p=thirdparty%2Fzstd.git removed direct call to malloc() from pool.c --- diff --git a/lib/common/pool.c b/lib/common/pool.c index 1b0fe1035..98b109e72 100644 --- a/lib/common/pool.c +++ b/lib/common/pool.c @@ -11,7 +11,6 @@ /* ====== Dependencies ======= */ #include /* size_t */ -#include /* malloc, calloc, free */ #include "pool.h" /* ====== Compiler specifics ====== */ @@ -115,7 +114,7 @@ POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customM * and full queues. */ ctx->queueSize = queueSize + 1; - ctx->queue = (POOL_job*) malloc(ctx->queueSize * sizeof(POOL_job)); + ctx->queue = (POOL_job*)ZSTD_malloc(ctx->queueSize * sizeof(POOL_job), customMem); ctx->queueHead = 0; ctx->queueTail = 0; ctx->numThreadsBusy = 0;