diff options
author | Damjan Marion <damarion@cisco.com> | 2022-04-11 18:41:49 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2022-04-12 22:40:52 +0000 |
commit | e4fa1d2f6b8721318c0f104f2615588b5d4e0441 (patch) | |
tree | 70d33a24bae0b9aa993fe6e03960e2b135accb70 /src/vppinfra/elf.h | |
parent | 65e770d895b13a6e5c73d13f436872ea626e47e3 (diff) |
vppinfra: vector perf improvements
Type: improvement
Change-Id: I37c187af80c21b8fb1ab15af112527a837e0df9e
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/elf.h')
-rw-r--r-- | src/vppinfra/elf.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vppinfra/elf.h b/src/vppinfra/elf.h index 8d9893120f5..56869f1b9c7 100644 --- a/src/vppinfra/elf.h +++ b/src/vppinfra/elf.h @@ -966,10 +966,10 @@ elf_get_section_contents (elf_main_t * em, result = 0; if (vec_len (s->contents) > 0) { + vec_attr_t va = { .elt_sz = elt_size }; /* Make vector copy of contents with given element size. */ result = - _vec_realloc (result, vec_len (s->contents) / elt_size, elt_size, - /* header_bytes */ 0, /* align */ 0, 0); + _vec_realloc_internal (result, vec_len (s->contents) / elt_size, &va); clib_memcpy (result, s->contents, vec_len (s->contents)); } |