/openbsd-current/libexec/ld.so/ |
H A D | reallocarray.c | 30 _dl_reallocarray(void *optr, size_t nmemb, size_t size) argument 32 if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && 33 nmemb > 0 && SIZE_MAX / nmemb < size) 35 return _dl_realloc(optr, size * nmemb);
|
/openbsd-current/usr.bin/sort/ |
H A D | radixsort.h | 36 void rxsort(struct sort_list_item **base, size_t nmemb);
|
H A D | mem.c | 53 sort_calloc(size_t nmemb, size_t size) argument 57 if ((ptr = calloc(nmemb, size)) == NULL) 75 sort_reallocarray(void *ptr, size_t nmemb, size_t size) argument 77 if ((ptr = reallocarray(ptr, nmemb, size)) == NULL)
|
H A D | mem.h | 41 void *sort_calloc(size_t nmemb, size_t size);
|
/openbsd-current/lib/libc/stdlib/ |
H A D | reallocarray.c | 30 reallocarray(void *optr, size_t nmemb, size_t size) argument 32 if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && 33 nmemb > 0 && SIZE_MAX / nmemb < size) { 37 return realloc(optr, size * nmemb);
|
H A D | bsearch.c | 50 bsearch(const void *key, const void *base0, size_t nmemb, size_t size, argument 58 for (lim = nmemb; lim != 0; lim >>= 1) {
|
H A D | heapsort.c | 68 * There are two cases. If j == nmemb, select largest of Ki and Kj. If 69 * j < nmemb, select largest of Ki, Kj and Kj+1. 71 #define CREATE(initval, nmemb, par_i, child_i, par, child, size, count, tmp) { \ 72 for (par_i = initval; (child_i = par_i * 2) <= nmemb; \ 75 if (child_i < nmemb && compar(child, child + size) < 0) { \ 103 #define SELECT(par_i, child_i, nmemb, par, child, size, k, count, tmp1, tmp2) { \ 104 for (par_i = 1; (child_i = par_i * 2) <= nmemb; par_i = child_i) { \ 106 if (child_i < nmemb && compar(child, child + size) < 0) { \ 134 heapsort(void *vbase, size_t nmemb, size_t size, argument 141 if (nmemb < [all...] |
/openbsd-current/usr.bin/ssh/ |
H A D | xmalloc.c | 41 xcalloc(size_t nmemb, size_t size) argument 45 if (size == 0 || nmemb == 0) 47 if (SIZE_MAX / nmemb < size) 48 fatal("xcalloc: nmemb * size > SIZE_MAX"); 49 ptr = calloc(nmemb, size); 52 size * nmemb); 57 xreallocarray(void *ptr, size_t nmemb, size_t size) argument 61 new_ptr = reallocarray(ptr, nmemb, size); 64 nmemb, size); 69 xrecallocarray(void *ptr, size_t onmemb, size_t nmemb, size_ argument [all...] |
/openbsd-current/usr.bin/ctfconv/ |
H A D | xmalloc.c | 41 xcalloc(size_t nmemb, size_t size) argument 45 if (size == 0 || nmemb == 0) 47 ptr = calloc(nmemb, size); 50 nmemb, size); 61 xreallocarray(void *ptr, size_t nmemb, size_t size) argument 65 if (nmemb == 0 || size == 0) 67 new_ptr = reallocarray(ptr, nmemb, size); 70 nmemb, size);
|
/openbsd-current/usr.bin/file/ |
H A D | xmalloc.c | 39 xcalloc(size_t nmemb, size_t size) argument 43 if (size == 0 || nmemb == 0) 45 ptr = calloc(nmemb, size); 47 err(1, "xcalloc: allocating %zu * %zu bytes", nmemb, size); 52 xreallocarray(void *ptr, size_t nmemb, size_t size) argument 56 new_ptr = reallocarray(ptr, nmemb, size); 59 nmemb, size);
|
/openbsd-current/usr.bin/rcs/ |
H A D | xmalloc.c | 39 xcalloc(size_t nmemb, size_t size) argument 43 if (size == 0 || nmemb == 0) 45 ptr = calloc(nmemb, size); 47 err(1, "xcalloc: allocating %zu * %zu bytes", nmemb, size); 52 xreallocarray(void *ptr, size_t nmemb, size_t size) argument 56 new_ptr = reallocarray(ptr, nmemb, size); 59 nmemb, size);
|
/openbsd-current/usr.bin/tmux/ |
H A D | xmalloc.c | 41 xcalloc(size_t nmemb, size_t size) argument 45 if (size == 0 || nmemb == 0) 47 ptr = calloc(nmemb, size); 50 nmemb, size, strerror(errno)); 61 xreallocarray(void *ptr, size_t nmemb, size_t size) argument 65 if (nmemb == 0 || size == 0) 67 new_ptr = reallocarray(ptr, nmemb, size); 70 nmemb, size, strerror(errno)); 75 xrecallocarray(void *ptr, size_t oldnmemb, size_t nmemb, size_t size) argument 79 if (nmemb [all...] |
/openbsd-current/gnu/lib/libiberty/src/ |
H A D | bsearch.c | 33 @deftypefn Supplemental void* bsearch (const void *@var{key}, const void *@var{base}, size_t @var{nmemb}, size_t @var{size}, int (*@var{compar})(const void *, const void *)) 35 Performs a search over an array of @var{nmemb} elements pointed to by 71 size_t nmemb, register size_t size, 78 for (lim = nmemb; lim != 0; lim >>= 1) { 70 bsearch(register const void *key, const void *base0, size_t nmemb, register size_t size, register int (*compar)(const void *, const void *)) argument
|
/openbsd-current/usr.bin/cvs/ |
H A D | xmalloc.c | 41 xcalloc(size_t nmemb, size_t size) argument 45 if (size == 0 || nmemb == 0) 47 ptr = calloc(nmemb, size); 50 nmemb, size, strerror(errno)); 55 xreallocarray(void *ptr, size_t nmemb, size_t size) argument 59 if (nmemb == 0 || size == 0) 61 new_ptr = reallocarray(ptr, nmemb, size); 64 nmemb, size, strerror(errno));
|
/openbsd-current/sys/dev/pci/drm/include/linux/ |
H A D | bsearch.h | 53 bsearch(const void *key, const void *base0, size_t nmemb, size_t size, argument 61 for (lim = nmemb; lim != 0; lim >>= 1) {
|
/openbsd-current/usr.bin/diff/ |
H A D | xmalloc.c | 39 xcalloc(size_t nmemb, size_t size) argument 43 ptr = calloc(nmemb, size); 45 err(2, "xcalloc: allocating %zu * %zu bytes", nmemb, size); 50 xreallocarray(void *ptr, size_t nmemb, size_t size) argument 54 new_ptr = reallocarray(ptr, nmemb, size); 57 nmemb, size);
|
/openbsd-current/usr.sbin/bgpd/ |
H A D | rde_sets.c | 32 size_t nmemb; member in struct:set_table 38 as_sets_new(struct as_set_head *as_sets, const char *name, size_t nmemb, argument 51 aset->set = set_new(nmemb, size); 111 set_new(size_t nmemb, size_t size) argument 119 if (nmemb == 0) 120 nmemb = 4; 123 set->max = nmemb; 124 set->set = calloc(nmemb, set->size); 144 rdemem.aset_nmemb -= set->nmemb; 152 if (set->max < nelms || set->max - nelms < set->nmemb) { [all...] |
/openbsd-current/usr.bin/mandoc/ |
H A D | dba_write.c | 81 dba_skip(int32_t nmemb, int32_t sz) argument 87 assert(nmemb > 0); 88 assert(nmemb <= 5); 91 if (nmemb - fwrite(&out, sizeof(out[0]), nmemb, ofp))
|
/openbsd-current/usr.sbin/makefs/ |
H A D | xmalloc.c | 18 ecalloc(size_t nmemb, size_t size) argument 22 if ((v = calloc(nmemb, size)) == NULL)
|
/openbsd-current/bin/ksh/ |
H A D | alloc.c | 71 areallocarray(void *ptr, size_t nmemb, size_t size, Area *ap) argument 74 if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && 75 nmemb > 0 && SIZE_MAX / nmemb < size) { 79 return aresize(ptr, nmemb * size, ap);
|
/openbsd-current/gnu/llvm/compiler-rt/lib/memprof/ |
H A D | memprof_malloc_linux.cpp | 61 INTERCEPTOR(void *, calloc, uptr nmemb, uptr size) { argument 63 return DlsymAlloc::Callocate(nmemb, size); 66 return memprof_calloc(nmemb, size, &stack); 78 INTERCEPTOR(void *, reallocarray, void *ptr, uptr nmemb, uptr size) { argument 81 return memprof_reallocarray(ptr, nmemb, size, &stack);
|
/openbsd-current/gnu/llvm/compiler-rt/lib/hwasan/ |
H A D | hwasan_allocation_functions.cpp | 113 void *__sanitizer_calloc(uptr nmemb, uptr size) { argument 115 return DlsymAlloc::Callocate(nmemb, size); 117 return hwasan_calloc(nmemb, size, &stack); 129 void *__sanitizer_reallocarray(void *ptr, uptr nmemb, uptr size) { argument 131 return hwasan_reallocarray(ptr, nmemb, size, &stack); 160 INTERCEPTOR_ALIAS(void *, calloc, SIZE_T nmemb, SIZE_T size); 162 INTERCEPTOR_ALIAS(void *, reallocarray, void *ptr, SIZE_T nmemb, SIZE_T size);
|
/openbsd-current/gnu/usr.bin/perl/ |
H A D | pp_sort.c | 175 dynprep(pTHX_ gptr *list1, gptr *list2, size_t nmemb, const SVCOMPARE_t cmp) argument 183 last = PINDEX(b, nmemb); 334 S_sortsv_flags_impl(pTHX_ gptr *base, size_t nmemb, SVCOMPARE_t cmp, U32 flags) argument 348 if (nmemb <= 1) return; /* sorted trivially */ 350 if (nmemb <= SMALLSORT) aux = small; /* use stack for aux array */ 351 else { Newx(aux,nmemb,gptr); } /* allocate auxiliary array */ 354 stackp->runs = dynprep(aTHX_ base, aux, nmemb, cmp); 548 Perl_sortsv_flags(pTHX_ gptr *base, size_t nmemb, SVCOMPARE_t cmp, U32 flags) argument 552 sortsv_flags_impl(base, nmemb, cmp, flags); 566 sortsv_amagic_i_ncmp(pTHX_ gptr *base, size_t nmemb, U3 argument 572 sortsv_amagic_i_ncmp_desc(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 578 sortsv_i_ncmp(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 584 sortsv_i_ncmp_desc(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 590 sortsv_amagic_ncmp(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 596 sortsv_amagic_ncmp_desc(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 602 sortsv_ncmp(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 608 sortsv_ncmp_desc(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 614 sortsv_amagic_cmp(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 620 sortsv_amagic_cmp_desc(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 626 sortsv_cmp(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 632 sortsv_cmp_desc(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 640 sortsv_amagic_cmp_locale(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 646 sortsv_amagic_cmp_locale_desc(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 652 sortsv_cmp_locale(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 658 sortsv_cmp_locale_desc(pTHX_ gptr *base, size_t nmemb, U32 flags) argument 678 Perl_sortsv(pTHX_ SV **array, size_t nmemb, SVCOMPARE_t cmp) argument [all...] |
/openbsd-current/gnu/usr.bin/gcc/gcc/testsuite/g++.old-deja/g++.pt/ |
H A D | crash16.C | 5 extern "C" void qsort(void *base, __SIZE_TYPE__ nmemb, __SIZE_TYPE__ size,
|
/openbsd-current/usr.bin/dc/ |
H A D | mem.c | 70 breallocarray(void *p, size_t nmemb, size_t size) argument 74 q = reallocarray(p, nmemb, size);
|