vppinfra: fix vec capacity 35/35635/11
authorFlorin Coras <fcoras@cisco.com>
Fri, 11 Mar 2022 18:58:55 +0000 (10:58 -0800)
committerDamjan Marion <dmarion@me.com>
Mon, 14 Mar 2022 22:03:37 +0000 (22:03 +0000)
commit41a1bbffc6238b0ed52b55f58ba884fe2f26e11f
treeea254eca7e168fcec23bc9bfcec43086974025c7
parent58fd481d73dce9c276facb42b9a9c3488c25417d
vppinfra: fix vec capacity

Rename vec_capacity to vec_mem_size  as it returned the size of the
underlying memory allocation not the number of bytes that can be used
for vector elements.

Add new vec_max_elts macro that returns number of elements that can fit
into generic vector.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2e53a2bfa6e56a89af62d6ddc073ead58b8c49bb
src/vppinfra/hash.c
src/vppinfra/heap.c
src/vppinfra/pool.h
src/vppinfra/vec_bootstrap.h