added POOL_sizeof() for single-thread

This commit is contained in:
Yann Collet 2017-06-02 11:36:47 -07:00
parent c35e535002
commit 6056e4c3eb

View 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 */