/external/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-poll.c | 48 size_t nmemb; local 60 nmemb = howmany(maxfd + 1 , NFDBITS); 61 if ((readfds = calloc(nmemb, sizeof(fd_mask))) == NULL || 62 (writefds = calloc(nmemb, sizeof(fd_mask))) == NULL || 63 (exceptfds = calloc(nmemb, sizeof(fd_mask))) == NULL) {
|
/external/valgrind/memcheck/tests/ |
H A D | undef_malloc_args.c | 28 size_t nmemb = 1; local 29 (void) VALGRIND_MAKE_MEM_UNDEFINED(&nmemb, 1); 30 new_p = calloc(nmemb, def_size); 42 size_t nmemb = 16; 45 new_p = memalign(nmemb, size);
|
/external/compiler-rt/lib/asan/ |
H A D | asan_malloc_linux.cc | 44 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { argument 50 uptr size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; 57 return asan_calloc(nmemb, size, &stack);
|
H A D | asan_malloc_win.cc | 68 void *calloc(size_t nmemb, size_t size) { argument 70 return asan_calloc(nmemb, size, &stack); 74 void *_calloc_dbg(size_t nmemb, size_t size, int, const char *, int) { argument 75 return calloc(nmemb, size); 79 void *_calloc_impl(size_t nmemb, size_t size, int *errno_tmp) { argument 80 return calloc(nmemb, size);
|
H A D | asan_malloc_mac.cc | 124 INTERCEPTOR(void *, calloc, size_t nmemb, size_t size) { argument 127 return asan_calloc(nmemb, size, &stack); 176 void *__asan_mz_calloc(malloc_zone_t *zone, size_t nmemb, size_t size) { argument 182 size_t size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; 189 return asan_calloc(nmemb, size, &stack);
|
/external/openssh/ |
H A D | xmalloc.c | 43 xcalloc(size_t nmemb, size_t size) argument 47 if (size == 0 || nmemb == 0) 49 if (SIZE_MAX / nmemb < size) 50 fatal("xcalloc: nmemb * size > SIZE_MAX"); 51 ptr = calloc(nmemb, size); 54 size * nmemb); 59 xrealloc(void *ptr, size_t nmemb, size_t size) argument 62 size_t new_size = nmemb * size; 66 if (SIZE_MAX / nmemb < size) 67 fatal("xrealloc: nmemb * siz [all...] |
/external/compiler-rt/lib/lsan/ |
H A D | lsan_interceptors.cc | 62 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { argument 68 uptr size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; 74 if (CallocShouldReturnNullDueToOverflow(size, nmemb)) return 0; 77 size *= nmemb;
|
/external/flac/include/share/ |
H A D | alloc.h | 77 static inline void *safe_calloc_(size_t nmemb, size_t size) argument 79 if(!nmemb || !size) 81 return calloc(nmemb, size);
|
/external/compiler-rt/lib/sanitizer_common/tests/ |
H A D | sanitizer_allocator_testlib.cc | 88 void *calloc(size_t nmemb, size_t size) { argument 91 size *= nmemb;
|
/external/google-breakpad/src/common/linux/ |
H A D | http_upload.cc | 40 size_t nmemb, void *userp) { 45 size_t real_size = size * nmemb; 39 WriteCallback(void *ptr, size_t size, size_t nmemb, void *userp) argument
|
H A D | libcurl_wrapper.cc | 101 size_t nmemb, void *userp) { 106 size_t real_size = size * nmemb; 100 WriteCallback(void *ptr, size_t size, size_t nmemb, void *userp) argument
|
/external/webp/src/utils/ |
H A D | utils.c | 163 // Returns 0 in case of overflow of nmemb * size. 164 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) { argument 165 const uint64_t total_size = nmemb * size; 166 if (nmemb == 0) return 1; 167 if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0; 183 void* WebPSafeMalloc(uint64_t nmemb, size_t size) { argument 186 if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL; 187 assert(nmemb * size > 0); 188 ptr = malloc((size_t)(nmemb * size)); 189 AddMem(ptr, (size_t)(nmemb * siz 193 WebPSafeCalloc(uint64_t nmemb, size_t size) argument [all...] |
/external/clang/test/Analysis/ |
H A D | unix-fns.c | 105 void test_calloc_nowarn(size_t nmemb, size_t size) { argument 106 char *foo = calloc(nmemb, size); // no-warning
|
/external/compiler-rt/lib/msan/ |
H A D | msan_allocator.cc | 153 void *MsanCalloc(StackTrace *stack, uptr nmemb, uptr size) { argument 155 if (CallocShouldReturnNullDueToOverflow(size, nmemb)) 157 return MsanReallocate(stack, 0, nmemb * size, sizeof(u64), true);
|
/external/mesa3d/src/mesa/main/ |
H A D | imports.c | 471 _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, argument 477 while (nmemb) { 478 nmemb >>= 1; 479 mid = (char *)base + nmemb * size; 485 --nmemb; 490 return bsearch(key, base, nmemb, size, compar);
|
/external/valgrind/drd/ |
H A D | drd_malloc_wrappers.c | 158 static void* drd_calloc(ThreadId tid, SizeT nmemb, SizeT size1) argument 160 return new_block(tid, nmemb*size1, VG_(clo_alignment),
|
/external/valgrind/drd/tests/ |
H A D | unit_bitmap.c | 65 void VG_(ssort)( void* base, SizeT nmemb, SizeT size, argument
|
/external/fio/ |
H A D | smalloc.c | 487 void *scalloc(size_t nmemb, size_t size) argument 491 ret = smalloc(nmemb * size); 493 memset(ret, 0, nmemb * size);
|
/external/wpa_supplicant_8/hostapd/src/utils/ |
H A D | os.h | 267 * @nmemb: Number of members in the array 271 * This function can be used as a wrapper for os_zalloc(nmemb * size) when an 277 static inline void * os_calloc(size_t nmemb, size_t size) argument 279 if (size && nmemb > (~(size_t) 0) / size) 281 return os_zalloc(nmemb * size); 565 static inline void * os_realloc_array(void *ptr, size_t nmemb, size_t size) argument 567 if (size && nmemb > (~(size_t) 0) / size) 569 return os_realloc(ptr, nmemb * size); 575 * @nmemb: Current member count of the array 579 static inline void os_remove_in_array(void *ptr, size_t nmemb, size_ argument [all...] |
/external/wpa_supplicant_8/src/utils/ |
H A D | os.h | 267 * @nmemb: Number of members in the array 271 * This function can be used as a wrapper for os_zalloc(nmemb * size) when an 277 static inline void * os_calloc(size_t nmemb, size_t size) argument 279 if (size && nmemb > (~(size_t) 0) / size) 281 return os_zalloc(nmemb * size); 565 static inline void * os_realloc_array(void *ptr, size_t nmemb, size_t size) argument 567 if (size && nmemb > (~(size_t) 0) / size) 569 return os_realloc(ptr, nmemb * size); 575 * @nmemb: Current member count of the array 579 static inline void os_remove_in_array(void *ptr, size_t nmemb, size_ argument [all...] |
/external/wpa_supplicant_8/wpa_supplicant/src/utils/ |
H A D | os.h | 267 * @nmemb: Number of members in the array 271 * This function can be used as a wrapper for os_zalloc(nmemb * size) when an 277 static inline void * os_calloc(size_t nmemb, size_t size) argument 279 if (size && nmemb > (~(size_t) 0) / size) 281 return os_zalloc(nmemb * size); 565 static inline void * os_realloc_array(void *ptr, size_t nmemb, size_t size) argument 567 if (size && nmemb > (~(size_t) 0) / size) 569 return os_realloc(ptr, nmemb * size); 575 * @nmemb: Current member count of the array 579 static inline void os_remove_in_array(void *ptr, size_t nmemb, size_ argument [all...] |
/external/aac/libSYS/src/ |
H A D | genericStds.cpp | 392 UINT FDKfwrite(void *ptrf, INT size, UINT nmemb, FDKFILE *fp) { return fwrite(ptrf, size, nmemb, (FILE*)fp); } argument 395 UINT FDKfread(void *dst, INT size, UINT nmemb, FDKFILE *fp) { return fread(dst, size, nmemb, (FILE*)fp); } argument 405 UINT FDKfwrite_EL(void *ptrf, INT size, UINT nmemb, FDKFILE *fp) { argument 408 FDKfwrite(ptrf, size, nmemb, fp); 415 for (n=0; n<nmemb; n++) { 423 return nmemb; 427 UINT FDKfread_EL(void *dst, INT size, UINT nmemb, FDKFILE *fp) { argument 436 for (n=0; n<nmemb; [all...] |
/external/valgrind/exp-sgcheck/ |
H A D | h_main.c | 374 void* h_replace_calloc ( ThreadId tid, SizeT nmemb, SizeT size1 ) argument 376 return alloc_and_new_mem_heap ( tid, nmemb*size1, VG_(clo_alignment),
|
/external/valgrind/memcheck/ |
H A D | mc_malloc_wrappers.c | 420 void* MC_(calloc) ( ThreadId tid, SizeT nmemb, SizeT size1 ) argument 422 if (MC_(record_fishy_value_error)(tid, "calloc", "nmemb", nmemb) || 426 return MC_(new_block) ( tid, 0, nmemb*size1, VG_(clo_alignment),
|