From 6056e4c3eb55ab7c5000818a4457241b9ccb2019 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 2 Jun 2017 11:36:47 -0700 Subject: [PATCH] added POOL_sizeof() for single-thread --- lib/common/pool.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/common/pool.c b/lib/common/pool.c index 05adcf1ce..749fa4f2f 100644 --- a/lib/common/pool.c +++ b/lib/common/pool.c @@ -198,4 +198,9 @@ void POOL_add(void *ctx, POOL_function function, void *opaque) { function(opaque); } +size_t POOL_sizeof(POOL_ctx *ctx) { + if (ctx==NULL) return 0; /* supports sizeof NULL */ + return sizeof(*ctx); +} + #endif /* ZSTD_MULTITHREAD */