80 _clib_fifo_resize (
void *v_old,
uword n_new_elts,
uword elt_bytes)
82 void *v_new, *
end, *head;
83 uword n_old_elts, header_bytes;
84 uword n_copy_bytes, n_zero_bytes;
88 n_new_elts += n_old_elts;
97 v_new += header_bytes;
102 _vec_len (v_new) = n_new_elts;
105 n_copy_bytes = n_old_elts * elt_bytes;
106 if (n_copy_bytes > 0)
109 end = v_old + _vec_len (v_old) * elt_bytes;
112 if (head + n_copy_bytes >=
end)
123 n_zero_bytes = (n_new_elts - n_old_elts) * elt_bytes;
124 clib_memset (v_new + n_copy_bytes, 0, n_zero_bytes);