diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2022-04-27 21:15:21 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-04-28 20:03:29 -0700 |
commit | 69721203b1f3f9d123ae0f81bbf41f9a85185859 (patch) | |
tree | 6d6592563e6ffba0093926826f57b73c99a17cf3 /tools/lib/bpf/libbpf.h | |
parent | b198881d4b4c22c499168421b44eff3913a22fb1 (diff) |
libbpf: Use libbpf_mem_ensure() when allocating new map
Reuse libbpf_mem_ensure() when adding a new map to the list of maps
inside bpf_object. It takes care of proper resizing and reallocating of
map array and zeroing out newly allocated memory.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220428041523.4089853-3-andrii@kernel.org
Diffstat (limited to 'tools/lib/bpf/libbpf.h')
0 files changed, 0 insertions, 0 deletions