diff --git a/src/vppinfra/hash.c b/src/vppinfra/hash.c
index f36ce83..7b88692 100644
--- a/src/vppinfra/hash.c
+++ b/src/vppinfra/hash.c
@@ -1009,7 +1009,7 @@
   if (!v)
     return 0;
 
-  bytes = vec_mem_size (v, hash_header_bytes (v));
+  bytes = vec_mem_size (v);
 
   for (i = 0; i < hash_capacity (v); i++)
     {
@@ -1019,7 +1019,7 @@
 	  if (h->log2_pair_size > 0)
 	    bytes += 1 << indirect_pair_get_log2_bytes (&p->indirect);
 	  else
-	    bytes += vec_mem_size (p->indirect.pairs, 0);
+	    bytes += vec_mem_size (p->indirect.pairs);
 	}
     }
   return bytes;
diff --git a/src/vppinfra/heap.c b/src/vppinfra/heap.c
index b54987a..b724f88 100644
--- a/src/vppinfra/heap.c
+++ b/src/vppinfra/heap.c
@@ -640,10 +640,10 @@
   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;
diff --git a/src/vppinfra/pool.h b/src/vppinfra/pool.h
index 32b42b1..35c8e1e 100644
--- a/src/vppinfra/pool.h
+++ b/src/vppinfra/pool.h
@@ -163,7 +163,7 @@
 #define _pool_var(v) _pool_##v
 
 /** Number of elements that can fit into pool with current allocation */
-#define pool_max_len(P) vec_max_elts (P, pool_aligned_header_bytes)
+#define pool_max_len(P) vec_max_len (P)
 
 /** Number of free elements in pool */
 #define pool_free_elts(P)                                                     \
diff --git a/src/vppinfra/vec_bootstrap.h b/src/vppinfra/vec_bootstrap.h
index d628d38..34e50c9 100644
--- a/src/vppinfra/vec_bootstrap.h
+++ b/src/vppinfra/vec_bootstrap.h
@@ -85,6 +85,14 @@
   return round_pow2 (header_bytes + sizeof (vec_header_t), VEC_HEADER_ROUND);
 }
 
+always_inline uword
+vec_get_header_size (void *v)
+{
+  uword header_size = _vec_find (v)->hdr_size * VEC_HEADER_ROUND;
+  ASSERT (header_size >= vec_header_bytes (0));
+  return header_size;
+}
+
 /** \brief Find a user vector header
 
     Finds the user header of a vector with unspecified alignment given
@@ -167,16 +175,14 @@
  * Return size of memory allocated for the vector
  *
  * @param v vector
- * @param b extra header bytes
  * @return memory size allocated for the vector
  */
-#define vec_mem_size(v, b)                                                    \
-  ({                                                                          \
-    void *_vec_mem_v = (void *) (v);                                          \
-    uword _vec_mem_b = (b);                                                   \
-    _vec_mem_b = sizeof (vec_header_t) + _vec_round_size (_vec_mem_b);        \
-    _vec_mem_v ? clib_mem_size (_vec_mem_v - _vec_mem_b) : 0;                 \
-  })
+
+always_inline uword
+vec_mem_size (void *v)
+{
+  return v ? clib_mem_size (v - vec_get_header_size (v)) : 0;
+}
 
 /**
  * Number of elements that can fit into generic vector
@@ -185,25 +191,26 @@
  * @param b extra header bytes
  * @return number of elements that can fit into vector
  */
-#define vec_max_elts(v, b)                                                    \
-  (v ? (vec_mem_size (v, b) - vec_header_bytes (b)) / sizeof (v[0]) : 0)
 
-/** \brief Total number of elements that can fit into vector. */
-#define vec_max_len(v) vec_max_elts (v, 0)
+always_inline uword
+_vec_max_len (void *v, uword elt_size)
+{
+  return v ? vec_mem_size (v) / elt_size : 0;
+}
 
-/** \brief Set vector length to a user-defined value */
-#ifndef __COVERITY__		/* Coverity gets confused by ASSERT() */
-#define vec_set_len(v, l) do {     \
-    ASSERT(v);                     \
-    ASSERT((l) <= vec_max_len(v)); \
-    CLIB_MEM_POISON_LEN((void *)(v), _vec_len(v) * sizeof((v)[0]), (l) * sizeof((v)[0])); \
-    _vec_len(v) = (l);             \
-} while (0)
-#else /* __COVERITY__ */
-#define vec_set_len(v, l) do {     \
-    _vec_len(v) = (l);             \
-} while (0)
-#endif /* __COVERITY__ */
+#define vec_max_len(v) _vec_max_len (v, sizeof ((v)[0]))
+
+always_inline void
+_vec_set_len (void *v, uword len, uword elt_size)
+{
+  ASSERT (v);
+  ASSERT (len <= vec_max_len (v));
+
+  CLIB_MEM_POISON_LEN (v, _vec_len (v) * elt_size, len * elt_size);
+  _vec_len (v) = len;
+}
+
+#define vec_set_len(v, l) _vec_set_len ((void *) v, l, sizeof ((v)[0]))
 
 /** \brief Reset vector length to zero
     NULL-pointer tolerant
