/freebsd-current/usr.bin/sort/ |
H A D | radixsort.h | 37 void rxsort(struct sort_list_item **base, size_t nmemb);
|
/freebsd-current/crypto/openssh/openbsd-compat/ |
H A D | reallocarray.c | 37 reallocarray(void *optr, size_t nmemb, size_t size) argument 39 if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && 40 nmemb > 0 && SIZE_MAX / nmemb < size) { 44 return realloc(optr, size * nmemb);
|
H A D | bsd-malloc.c | 37 rpl_calloc(size_t nmemb, size_t size) argument 39 if (nmemb == 0) 40 nmemb = 1; 43 return calloc(nmemb, size);
|
/freebsd-current/contrib/unbound/compat/ |
H A D | reallocarray.c | 34 reallocarray(void *optr, size_t nmemb, size_t size) argument 36 if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && 37 nmemb > 0 && SIZE_MAX / nmemb < size) { 41 return realloc(optr, size * nmemb);
|
/freebsd-current/contrib/mandoc/ |
H A D | compat_reallocarray.c | 32 reallocarray(void *optr, size_t nmemb, size_t size) argument 34 if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && 35 nmemb > 0 && SIZE_MAX / nmemb < size) { 39 return realloc(optr, size * nmemb);
|
H A D | test-ohash.c | 17 xcalloc(size_t nmemb, size_t sz, void *arg) argument 19 return calloc(nmemb,sz);
|
H A D | dba_write.c | 91 dba_skip(int32_t nmemb, int32_t sz) argument 97 assert(nmemb > 0); 98 assert(nmemb <= 5); 101 if (nmemb - fwrite(&out, sizeof(out[0]), nmemb, ofp))
|
/freebsd-current/lib/libc/stdlib/ |
H A D | reallocarray.c | 30 reallocarray(void *optr, size_t nmemb, size_t size) argument 33 if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && 34 nmemb > 0 && SIZE_MAX / nmemb < size) { 38 return (realloc(optr, size * nmemb));
|
H A D | heapsort.c | 79 * There two cases. If j == nmemb, select largest of Ki and Kj. If 80 * j < nmemb, select largest of Ki, Kj and Kj+1. 82 #define CREATE(initval, nmemb, par_i, child_i, par, child, size, count, tmp) { \ 83 for (par_i = initval; (child_i = par_i * 2) <= nmemb; \ 86 if (child_i < nmemb && COMPAR(child, child + size) < 0) { \ 114 #define SELECT(par_i, child_i, nmemb, par, child, size, k, count, tmp1, tmp2) { \ 115 for (par_i = 1; (child_i = par_i * 2) <= nmemb; par_i = child_i) { \ 117 if (child_i < nmemb && COMPAR(child, child + size) < 0) { \ 152 heapsort_b(void *vbase, size_t nmemb, size_t size, heapsort_block compar) argument 155 heapsort(void *vbase, size_t nmemb, size_ [all...] |
H A D | bsearch.c | 61 bsearch_b(const void *key, const void *base0, size_t nmemb, size_t size, argument 65 bsearch(const void *key, const void *base0, size_t nmemb, size_t size, 74 for (lim = nmemb; lim != 0; lim >>= 1) {
|
/freebsd-current/contrib/libdiff/compat/ |
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);
|
/freebsd-current/sys/dev/drm2/ |
H A D | drm_mem_util.h | 35 static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) argument 38 return mallocarray(nmemb, size, DRM_MEM_DRIVER, M_NOWAIT | M_ZERO); 42 static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) argument 45 return mallocarray(nmemb, size, DRM_MEM_DRIVER, M_NOWAIT);
|
/freebsd-current/crypto/openssh/ |
H A D | xmalloc.c | 47 xcalloc(size_t nmemb, size_t size) argument 51 if (size == 0 || nmemb == 0) 53 if (SIZE_MAX / nmemb < size) 54 fatal("xcalloc: nmemb * size > SIZE_MAX"); 55 ptr = calloc(nmemb, size); 58 size * nmemb); 63 xreallocarray(void *ptr, size_t nmemb, size_t size) argument 67 new_ptr = reallocarray(ptr, nmemb, size); 70 nmemb, size); 75 xrecallocarray(void *ptr, size_t onmemb, size_t nmemb, size_ argument [all...] |
/freebsd-current/sbin/rcorder/ |
H A D | ealloc.h | 6 void *ecalloc(size_t nmemb, size_t size);
|
H A D | ealloc.c | 112 ecalloc(size_t nmemb, size_t size) argument 116 if ((ptr = calloc(nmemb, size)) == NULL)
|
/freebsd-current/lib/libc/tests/stdlib/ |
H A D | test-sort.h | 51 ssort(int v[], int nmemb) argument 55 for (i = 0; i < nmemb; i++) { 56 for (j = i + 1; j < nmemb; j++) {
|
/freebsd-current/sys/libkern/ |
H A D | bsearch.c | 52 bsearch(const void *key, const void *base0, size_t nmemb, size_t size, argument 60 for (lim = nmemb; lim != 0; lim >>= 1) {
|
/freebsd-current/contrib/ntp/libntp/ |
H A D | emalloc.c | 88 size_t nmemb, 98 if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && 99 nmemb > 0 && SIZE_MAX / nmemb < size) { 110 return ereallocz(optr, extra + (size * nmemb), 0, TRUE); 112 return ereallocz(optr, extra + (size * nmemb), 0, TRUE, file, line); 86 oreallocarrayxz( void *optr, size_t nmemb, size_t size, size_t extra , const char * file, int line ) argument
|
/freebsd-current/contrib/ntp/sntp/libpkgver/ |
H A D | colcomp.c | 102 size_t nmemb = 0; local 114 nmemb = sizeof ca / size; 116 printf("argc is <%d>, nmemb = <%d>\n", argc, nmemb); 120 for (i = 0; i < nmemb; ++i) { 124 qsort((void *)base, nmemb, size, qcmp); 128 for (i = 0; i < nmemb; ++i) {
|
/freebsd-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);
|
/freebsd-current/contrib/ntp/libntp/lib/isc/unix/ |
H A D | stdio.c | 64 isc_stdio_read(void *ptr, size_t size, size_t nmemb, FILE *f, size_t *nret) { argument 69 r = fread(ptr, size, nmemb, f); 70 if (r != nmemb) { 82 isc_stdio_write(const void *ptr, size_t size, size_t nmemb, FILE *f, argument 89 r = fwrite(ptr, size, nmemb, f); 90 if (r != nmemb)
|
/freebsd-current/contrib/ntp/libntp/lib/isc/include/isc/ |
H A D | stdio.h | 55 isc_stdio_read(void *ptr, size_t size, size_t nmemb, FILE *f, 60 isc_stdio_write(const void *ptr, size_t size, size_t nmemb, FILE *f,
|
/freebsd-current/bin/sh/bltin/ |
H A D | bltin.h | 59 #define fwrite(ptr, size, nmemb, file) outbin(ptr, (size) * (nmemb), file)
|
/freebsd-current/contrib/llvm-project/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);
|
/freebsd-current/contrib/llvm-project/compiler-rt/lib/hwasan/ |
H A D | hwasan_allocation_functions.cpp | 124 void *__sanitizer_calloc(uptr nmemb, uptr size) { argument 126 return DlsymAlloc::Callocate(nmemb, size); 128 return hwasan_calloc(nmemb, size, &stack); 140 void *__sanitizer_reallocarray(void *ptr, uptr nmemb, uptr size) { argument 142 return hwasan_reallocarray(ptr, nmemb, size, &stack); 178 INTERCEPTOR_ALIAS(void *, calloc, SIZE_T nmemb, SIZE_T size); 180 INTERCEPTOR_ALIAS(void *, reallocarray, void *ptr, SIZE_T nmemb, SIZE_T size);
|