Home
last modified time | relevance | path

Searched refs:cap_cnt (Results 1 – 2 of 2) sorted by relevance

/third_party/libbpf/src/
Dlibbpf_internal.h266 void *libbpf_add_mem(void **data, size_t *cap_cnt, size_t elem_sz,
268 int libbpf_ensure_mem(void **data, size_t *cap_cnt, size_t elem_sz, size_t need_cnt);
Dbtf.c156 void *libbpf_add_mem(void **data, size_t *cap_cnt, size_t elem_sz, in libbpf_add_mem() argument
162 if (cur_cnt + add_cnt <= *cap_cnt) in libbpf_add_mem()
169 new_cnt = *cap_cnt; in libbpf_add_mem()
183 memset(new_data + (*cap_cnt) * elem_sz, 0, (new_cnt - *cap_cnt) * elem_sz); in libbpf_add_mem()
186 *cap_cnt = new_cnt; in libbpf_add_mem()
193 int libbpf_ensure_mem(void **data, size_t *cap_cnt, size_t elem_sz, size_t need_cnt) in libbpf_ensure_mem() argument
197 if (need_cnt <= *cap_cnt) in libbpf_ensure_mem()
200 p = libbpf_add_mem(data, cap_cnt, elem_sz, *cap_cnt, SIZE_MAX, need_cnt - *cap_cnt); in libbpf_ensure_mem()