]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
added POOL_sizeof() for single-thread
authorYann Collet <cyan@fb.com>
Fri, 2 Jun 2017 18:36:47 +0000 (11:36 -0700)
committerYann Collet <cyan@fb.com>
Fri, 2 Jun 2017 18:36:47 +0000 (11:36 -0700)
lib/common/pool.c

index 05adcf1ce40b8a1e0c678bff507ce721cb17a883..749fa4f2f7b41e5356a76a6a51fc713306d15409 100644 (file)
@@ -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 */