Searched refs:nmemb (Results 1 – 4 of 4) sorted by relevance
/tools/include/tools/ |
D | libc_compat.h | 11 static inline void *reallocarray(void *ptr, size_t nmemb, size_t size) in reallocarray() argument 15 if (unlikely(check_mul_overflow(nmemb, size, &bytes))) in reallocarray()
|
/tools/lib/bpf/ |
D | libbpf_internal.h | 93 static inline void *libbpf_reallocarray(void *ptr, size_t nmemb, size_t size) in libbpf_reallocarray() argument 98 if (unlikely(__builtin_mul_overflow(nmemb, size, &total))) in libbpf_reallocarray() 101 if (size == 0 || nmemb > ULONG_MAX / size) in libbpf_reallocarray() 103 total = nmemb * size; in libbpf_reallocarray()
|
/tools/perf/ |
D | builtin-trace.c | 1162 static struct syscall_fmt *__syscall_fmt__find(struct syscall_fmt *fmts, const int nmemb, const cha… in __syscall_fmt__find() argument 1164 return bsearch(name, fmts, nmemb, sizeof(struct syscall_fmt), syscall_fmt__cmp); in __syscall_fmt__find() 1169 const int nmemb = ARRAY_SIZE(syscall_fmts); in syscall_fmt__find() local 1170 return __syscall_fmt__find(syscall_fmts, nmemb, name); in syscall_fmt__find() 1173 static struct syscall_fmt *__syscall_fmt__find_by_alias(struct syscall_fmt *fmts, const int nmemb, … in __syscall_fmt__find_by_alias() argument 1177 for (i = 0; i < nmemb; ++i) { in __syscall_fmt__find_by_alias() 1187 const int nmemb = ARRAY_SIZE(syscall_fmts); in syscall_fmt__find_by_alias() local 1188 return __syscall_fmt__find_by_alias(syscall_fmts, nmemb, alias); in syscall_fmt__find_by_alias() 1674 __syscall_arg_fmt__find_by_name(struct syscall_arg_fmt *fmts, const int nmemb, const char *name) in __syscall_arg_fmt__find_by_name() argument 1676 return bsearch(name, fmts, nmemb, sizeof(struct syscall_arg_fmt), syscall_arg_fmt__cmp); in __syscall_arg_fmt__find_by_name() [all …]
|
/tools/perf/util/ |
D | annotate.c | 684 const int nmemb = arch->nr_instructions; in ins__sort() local 686 qsort(arch->instructions, nmemb, sizeof(struct ins), ins__cmp); in ins__sort() 692 const int nmemb = arch->nr_instructions; in __ins__find() local 699 ins = bsearch(name, arch->instructions, nmemb, sizeof(struct ins), ins__key_cmp); in __ins__find() 730 const int nmemb = ARRAY_SIZE(architectures); in arch__sort() local 732 qsort(architectures, nmemb, sizeof(struct arch), arch__cmp); in arch__sort() 737 const int nmemb = ARRAY_SIZE(architectures); in arch__find() local 745 return bsearch(name, architectures, nmemb, sizeof(struct arch), arch__key_cmp); in arch__find()
|