/freebsd-10.0-release/usr.bin/sort/ |
H A D | radixsort.h | 36 void rxsort(struct sort_list_item **base, size_t nmemb);
|
H A D | radixsort.c | 636 run_sort(struct sort_list_item **base, size_t nmemb) argument 642 if (nmemb < MT_SORT_THRESHOLD) 665 sl->tosort_num = nmemb; 666 sl->tosort_sz = nmemb; 669 sort_left = nmemb; 687 rxsort(struct sort_list_item **base, size_t nmemb) argument 690 run_sort(base, nmemb);
|
/freebsd-10.0-release/crypto/openssh/ |
H A D | xmalloc.c | 41 xcalloc(size_t nmemb, size_t size) argument 45 if (size == 0 || nmemb == 0) 47 if (SIZE_T_MAX / nmemb < size) 48 fatal("xcalloc: nmemb * size > SIZE_T_MAX"); 49 ptr = calloc(nmemb, size); 52 (u_long)(size * nmemb)); 57 xrealloc(void *ptr, size_t nmemb, size_t size) argument 60 size_t new_size = nmemb * size; 64 if (SIZE_T_MAX / nmemb < size) 65 fatal("xrealloc: nmemb * siz [all...] |
/freebsd-10.0-release/sbin/rcorder/ |
H A D | ealloc.h | 7 void *ecalloc(size_t nmemb, size_t size);
|
H A D | ealloc.c | 111 ecalloc(size_t nmemb, size_t size) argument 115 if ((ptr = calloc(nmemb, size)) == NULL)
|
/freebsd-10.0-release/lib/libc/stdlib/ |
H A D | bsearch.c | 56 bsearch(key, base0, nmemb, size, compar) 59 size_t nmemb; 68 for (lim = nmemb; lim != 0; lim >>= 1) {
|
H A D | heapsort.c | 73 * There two cases. If j == nmemb, select largest of Ki and Kj. If 74 * j < nmemb, select largest of Ki, Kj and Kj+1. 76 #define CREATE(initval, nmemb, par_i, child_i, par, child, size, count, tmp) { \ 77 for (par_i = initval; (child_i = par_i * 2) <= nmemb; \ 80 if (child_i < nmemb && compar(child, child + size) < 0) { \ 108 #define SELECT(par_i, child_i, nmemb, par, child, size, k, count, tmp1, tmp2) { \ 109 for (par_i = 1; (child_i = par_i * 2) <= nmemb; par_i = child_i) { \ 111 if (child_i < nmemb && compar(child, child + size) < 0) { \ 139 heapsort(vbase, nmemb, size, compar) 141 size_t nmemb, siz [all...] |
H A D | merge.c | 98 mergesort(base, nmemb, size, cmp) 100 size_t nmemb; 115 if (nmemb == 0) 126 if ((list2 = malloc(nmemb * size + PSIZE)) == NULL) 130 setup(list1, list2, nmemb, size, cmp); 131 last = list2 + nmemb * size; 226 last = list2 + nmemb*size; 229 memmove(list2, list1, nmemb*size);
|
/freebsd-10.0-release/sys/libkern/ |
H A D | bsearch.c | 56 bsearch(key, base0, nmemb, size, compar) 59 size_t nmemb; 68 for (lim = nmemb; lim != 0; lim >>= 1) {
|
/freebsd-10.0-release/tools/regression/lib/libc/stdlib/ |
H A D | test-sort.h | 49 ssort(int v[], int nmemb) argument 53 for (i = 0; i < nmemb; i++) { 54 for (j = i + 1; j < nmemb; j++) {
|
/freebsd-10.0-release/contrib/binutils/libiberty/ |
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
|
/freebsd-10.0-release/contrib/gcclibs/libiberty/ |
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
|
/freebsd-10.0-release/usr.bin/grep/regex/ |
H A D | xmalloc.h | 15 void *xcalloc_impl(size_t nmemb, size_t size, const char *file, int line, 50 #define xcalloc(nmemb, size) xcalloc_impl(nmemb, size, __FILE__, __LINE__, \ 70 #define xcalloc(nmemb, size) calloc(nmemb, size)
|
H A D | xmalloc.c | 272 xcalloc_impl(size_t nmemb, size_t size, const char *file, int line, 297 ptr = calloc(nmemb, size); 299 hash_table_add(xmalloc_table, ptr, (int)(nmemb * size), file, line, func); 270 xcalloc_impl(size_t nmemb, size_t size, const char *file, int line, const char *func) argument
|
/freebsd-10.0-release/bin/sh/bltin/ |
H A D | bltin.h | 59 #define fwrite(ptr, size, nmemb, file) outbin(ptr, (size) * (nmemb), file)
|
/freebsd-10.0-release/crypto/openssh/openbsd-compat/ |
H A D | bsd-poll.c | 45 size_t nmemb; local 57 nmemb = howmany(maxfd + 1 , NFDBITS); 58 if ((readfds = calloc(nmemb, sizeof(fd_mask))) == NULL || 59 (writefds = calloc(nmemb, sizeof(fd_mask))) == NULL || 60 (exceptfds = calloc(nmemb, sizeof(fd_mask))) == NULL) {
|
/freebsd-10.0-release/contrib/nvi/common/ |
H A D | mem.h | 159 #define CALLOC(sp, p, cast, nmemb, size) { \ 160 if ((p = (cast)calloc(nmemb, size)) == NULL) \ 163 #define CALLOC_GOTO(sp, p, cast, nmemb, size) { \ 164 if ((p = (cast)calloc(nmemb, size)) == NULL) \ 167 #define CALLOC_NOMSG(sp, p, cast, nmemb, size) { \ 168 p = (cast)calloc(nmemb, size); \ 170 #define CALLOC_RET(sp, p, cast, nmemb, size) { \ 171 if ((p = (cast)calloc(nmemb, size)) == NULL) { \
|
/freebsd-10.0-release/contrib/wpa/src/utils/ |
H A D | os.h | 185 * @nmemb: Number of members in the array 189 * This function can be used as a wrapper for os_zalloc(nmemb * size) when an 195 static inline void * os_calloc(size_t nmemb, size_t size) argument 197 if (size && nmemb > (~(size_t) 0) / size) 199 return os_zalloc(nmemb * size); 489 static inline void * os_realloc_array(void *ptr, size_t nmemb, size_t size) argument 491 if (size && nmemb > (~(size_t) 0) / size) 493 return os_realloc(ptr, nmemb * size);
|
/freebsd-10.0-release/contrib/binutils/bfd/ |
H A D | libbfd.c | 180 /* Allocate memory using malloc, nmemb * size with overflow checking. */ 183 bfd_malloc2 (bfd_size_type nmemb, bfd_size_type size) 187 if ((nmemb | size) >= HALF_BFD_SIZE_TYPE 189 && nmemb > ~(bfd_size_type) 0 / size) 195 size *= nmemb; 234 /* Reallocate memory using realloc, nmemb * size with overflow checking. */ 237 bfd_realloc2 (void *ptr, bfd_size_type nmemb, bfd_size_type size) 241 if ((nmemb | size) >= HALF_BFD_SIZE_TYPE 243 && nmemb > ~(bfd_size_type) 0 / size) 249 size *= nmemb; 182 bfd_malloc2(bfd_size_type nmemb, bfd_size_type size) argument 236 bfd_realloc2(void *ptr, bfd_size_type nmemb, bfd_size_type size) argument 297 bfd_zmalloc2(bfd_size_type nmemb, bfd_size_type size) argument [all...] |
H A D | opncls.c | 908 void *bfd_alloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size); 911 Allocate a block of @var{nmemb} elements of @var{size} bytes each 916 bfd_alloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size) 920 if ((nmemb | size) >= HALF_BFD_SIZE_TYPE 922 && nmemb > ~(bfd_size_type) 0 / size) 928 size *= nmemb; 970 void *bfd_zalloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size); 973 Allocate a block of @var{nmemb} elements of @var{size} bytes each 978 bfd_zalloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size) 982 if ((nmemb | siz 915 bfd_alloc2(bfd *abfd, bfd_size_type nmemb, bfd_size_type size) argument 977 bfd_zalloc2(bfd *abfd, bfd_size_type nmemb, bfd_size_type size) argument [all...] |
/freebsd-10.0-release/contrib/xz/src/liblzma/api/lzma/ |
H A D | base.h | 350 * \param nmemb Number of elements like in calloc(). liblzma 351 * will always set nmemb to 1, so it is safe to 352 * ignore nmemb in a custom allocator if you like. 353 * The nmemb argument exists only for 376 void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size);
|
/freebsd-10.0-release/usr.bin/xlint/llib/ |
H A D | llib-lstdc | 170 size_t (fread)(void *ptr, size_t size, size_t nmemb, FILE *stream); 171 size_t (fwrite)(const void *ptr, size_t size, size_t nmemb, FILE *stream); 193 void *(calloc)(size_t nmemb, size_t size); 202 void *(bsearch)(const void *key, const void *base, size_t nmemb, 204 void (qsort)(void *base, size_t nmemb, size_t size,
|
H A D | llib-lposix | 82 void *(bsearch)(const void *key, const void *base, size_t nmemb, 84 void *(calloc)(size_t nmemb, size_t size); 137 size_t (fread)(void *ptr, size_t size, size_t nmemb, FILE *stream); 147 size_t (fwrite)(const void *ptr, size_t size, size_t nmemb, FILE *stream); 215 void (qsort)(void *base, size_t nmemb, size_t size,
|
/freebsd-10.0-release/contrib/unbound/util/ |
H A D | alloc.c | 368 void *unbound_stat_calloc(size_t nmemb, size_t size) argument 370 size_t s = (nmemb*size==0)?(size_t)1:nmemb*size; 373 log_info("stat %p=calloc(%u, %u)", res+16, (unsigned)nmemb, (unsigned)size); 446 void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file, argument 450 (unsigned) nmemb, (unsigned)size); 451 return unbound_stat_calloc(nmemb, size); 503 void *unbound_stat_calloc_lite(size_t nmemb, size_t size, const char* file, argument 506 size_t req = nmemb * size;
|
/freebsd-10.0-release/usr.bin/grep/ |
H A D | grep.h | 140 void *grep_calloc(size_t nmemb, size_t size);
|