X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvppinfra%2Fpool.c;h=c2f587a93f4f4d2359fc8c666636c835a9b130fd;hb=68843d1b6ce52315f8a3567537a3cb246c1ecf40;hp=ed04eb68e31b20054426b8b562f19f8844666d16;hpb=b7b929931a07fbb27b43d5cd105f366c3e29807e;p=vpp.git diff --git a/src/vppinfra/pool.c b/src/vppinfra/pool.c index ed04eb68e31..c2f587a93f4 100644 --- a/src/vppinfra/pool.c +++ b/src/vppinfra/pool.c @@ -37,7 +37,7 @@ #include -void +__clib_export void _pool_init_fixed (void **pool_ptr, u32 elt_size, u32 max_elts) { u8 *mmap_base; @@ -55,9 +55,7 @@ _pool_init_fixed (void **pool_ptr, u32 elt_size, u32 max_elts) ASSERT (elt_size); ASSERT (max_elts); - vector_size = pool_aligned_header_bytes + vec_header_bytes (0) - + (u64) elt_size *max_elts; - + vector_size = pool_aligned_header_bytes + (u64) elt_size *max_elts; free_index_size = vec_header_bytes (0) + sizeof (u32) * max_elts; /* Round up to a cache line boundary */ @@ -99,7 +97,7 @@ _pool_init_fixed (void **pool_ptr, u32 elt_size, u32 max_elts) vh->len = max_elts; /* Build the free-index vector */ - vh = (vec_header_t *) (v + vector_size); + vh = (vec_header_t *) ((u8 *) fh + vector_size); vh->len = max_elts; fi = (u32 *) (vh + 1);