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)
114 uword n = end - head;
123 n_zero_bytes = (n_new_elts - n_old_elts) * elt_bytes;
124 memset (v_new + n_copy_bytes, 0, n_zero_bytes);
static uword clib_fifo_elts(void *v)
memset(h->entries, 0, sizeof(h->entries[0])*entries)
static uword vec_header_bytes(uword header_bytes)
#define clib_mem_alloc_no_fail(size)
#define clib_memcpy(a, b, c)
static uword max_pow2(uword x)
#define clib_fifo_free(f)
static clib_fifo_header_t * clib_fifo_header(void *f)