summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/heap.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-03-17 15:32:56 +0100
committerFlorin Coras <florin.coras@gmail.com>2022-03-17 20:31:14 +0000
commit5c45d1cf1b46c1ec83d50d032d6e7cad5fa3fefd (patch)
tree757f3fc0ad8a77b742857bcf1180792777447ee6 /src/vppinfra/heap.c
parent1da361f9ea525663a1141c3665a67df5e81c4133 (diff)
vppinfra: vec_max_len, vec_mem_size use stored header size
Type: improvement Change-Id: I17778e89674da0e8204713302e2293377bdabcbc Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/heap.c')
-rw-r--r--src/vppinfra/heap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vppinfra/heap.c b/src/vppinfra/heap.c
index b54987abe5e..b724f88fdae 100644
--- a/src/vppinfra/heap.c
+++ b/src/vppinfra/heap.c
@@ -640,10 +640,10 @@ heap_bytes (void *v)
bytes = sizeof (h[0]);
bytes += vec_len (v) * sizeof (h->elt_bytes);
for (b = 0; b < vec_len (h->free_lists); b++)
- bytes += vec_mem_size (h->free_lists[b], 0);
+ bytes += vec_mem_size (h->free_lists[b]);
bytes += vec_bytes (h->free_lists);
- bytes += vec_mem_size (h->elts, 0);
- bytes += vec_mem_size (h->free_elts, 0);
+ bytes += vec_mem_size (h->elts);
+ bytes += vec_mem_size (h->free_elts);
bytes += vec_bytes (h->used_elt_bitmap);
return bytes;