aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/pool.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/pool.c')
-rw-r--r--src/vppinfra/pool.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vppinfra/pool.c b/src/vppinfra/pool.c
index 2bbfe60d320..1f3b96f0f0a 100644
--- a/src/vppinfra/pool.c
+++ b/src/vppinfra/pool.c
@@ -44,11 +44,14 @@ _pool_init_fixed (void **pool_ptr, uword elt_size, uword max_elts, uword align)
pool_header_t *ph;
u8 *v;
u32 i;
+ vec_attr_t va = { .elt_sz = elt_size,
+ .align = align,
+ .hdr_sz = sizeof (pool_header_t) };
ASSERT (elt_size);
ASSERT (max_elts);
- v = _vec_realloc (0, max_elts, elt_size, sizeof (pool_header_t), align, 0);
+ v = _vec_alloc_internal (max_elts, &va);
ph = pool_header (v);
ph->max_elts = max_elts;