diff --git a/src/vppinfra/heap.h b/src/vppinfra/heap.h
index 8b43064..f496fe0 100644
--- a/src/vppinfra/heap.h
+++ b/src/vppinfra/heap.h
@@ -163,12 +163,6 @@
   return vec_header (v);
 }
 
-always_inline uword
-heap_header_bytes ()
-{
-  return vec_header_bytes (sizeof (heap_header_t));
-}
-
 always_inline void
 heap_dup_header (heap_header_t * old, heap_header_t * new)
 {
@@ -198,10 +192,8 @@
   if (!v_old)
     return v_old;
 
-  v_new = 0;
-  v_new =
-    _vec_resize (v_new, _vec_len (v_old), v_bytes, sizeof (heap_header_t),
-		 HEAP_DATA_ALIGN);
+  v_new = _vec_realloc (0, _vec_len (v_old), 1, sizeof (heap_header_t),
+			HEAP_DATA_ALIGN, 0);
   h_new = heap_header (v_new);
   heap_dup_header (h_old, h_new);
   clib_memcpy_fast (v_new, v_old, v_bytes);
@@ -220,9 +212,8 @@
 always_inline void *
 _heap_new (u32 len, u32 n_elt_bytes)
 {
-  void *v = _vec_resize ((void *) 0, len, (uword) len * n_elt_bytes,
-			 sizeof (heap_header_t),
-			 HEAP_DATA_ALIGN);
+  void *v = _vec_realloc ((void *) 0, len, n_elt_bytes, sizeof (heap_header_t),
+			  HEAP_DATA_ALIGN, 0);
   heap_header (v)->elt_bytes = n_elt_bytes;
   return v;
 }
@@ -249,27 +240,6 @@
   return v ? heap_header (v)->max_len : 0;
 }
 
-/* Create fixed size heap with given block of memory. */
-always_inline void *
-heap_create_from_memory (void *memory, uword max_len, uword elt_bytes)
-{
-  heap_header_t *h;
-  void *v;
-
-  if (max_len * elt_bytes < sizeof (h[0]))
-    return 0;
-
-  h = memory;
-  clib_memset (h, 0, sizeof (h[0]));
-  h->max_len = max_len;
-  h->elt_bytes = elt_bytes;
-  h->flags = HEAP_IS_STATIC;
-
-  v = (void *) (memory + heap_header_bytes ());
-  _vec_len (v) = 0;
-  return v;
-}
-
 /* Execute BODY for each allocated heap element. */
 #define heap_foreach(var,len,heap,body)			\
 do {							\
