diff --git a/src/pool.c b/src/pool.c index 9d247eb58..5108a81e6 100644 --- a/src/pool.c +++ b/src/pool.c @@ -344,6 +344,10 @@ struct pool_head *create_pool_from_reg(const char *name, struct pool_registratio unsigned int best_diff; int thr __maybe_unused; + /* alignment of zero means type alignment */ + if (!alignment) + alignment = reg->type_align; + /* extend alignment if needed */ if (alignment < sizeof(void*)) alignment = sizeof(void*);