/external/webp/src/utils/ |
D | utils.c | 164 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) { in CheckSizeArgumentsOverflow() argument 165 const uint64_t total_size = nmemb * size; in CheckSizeArgumentsOverflow() 166 if (nmemb == 0) return 1; in CheckSizeArgumentsOverflow() 167 if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0; in CheckSizeArgumentsOverflow() 183 void* WebPSafeMalloc(uint64_t nmemb, size_t size) { in WebPSafeMalloc() argument 186 if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL; in WebPSafeMalloc() 187 assert(nmemb * size > 0); in WebPSafeMalloc() 188 ptr = malloc((size_t)(nmemb * size)); in WebPSafeMalloc() 189 AddMem(ptr, (size_t)(nmemb * size)); in WebPSafeMalloc() 193 void* WebPSafeCalloc(uint64_t nmemb, size_t size) { in WebPSafeCalloc() argument [all …]
|
D | utils.h | 38 WEBP_EXTERN(void*) WebPSafeMalloc(uint64_t nmemb, size_t size); 41 WEBP_EXTERN(void*) WebPSafeCalloc(uint64_t nmemb, size_t size);
|
/external/openssh/ |
D | xmalloc.c | 43 xcalloc(size_t nmemb, size_t size) in xcalloc() argument 47 if (size == 0 || nmemb == 0) in xcalloc() 49 if (SIZE_MAX / nmemb < size) in xcalloc() 51 ptr = calloc(nmemb, size); in xcalloc() 54 size * nmemb); in xcalloc() 59 xrealloc(void *ptr, size_t nmemb, size_t size) in xrealloc() argument 62 size_t new_size = nmemb * size; in xrealloc() 66 if (SIZE_MAX / nmemb < size) in xrealloc()
|
/external/openssh/openbsd-compat/ |
D | reallocarray.c | 37 reallocarray(void *optr, size_t nmemb, size_t size) in reallocarray() argument 39 if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && in reallocarray() 40 nmemb > 0 && SIZE_MAX / nmemb < size) { in reallocarray() 44 return realloc(optr, size * nmemb); in reallocarray()
|
D | bsd-poll.c | 48 size_t nmemb; in poll() local 60 nmemb = howmany(maxfd + 1 , NFDBITS); in poll() 61 if ((readfds = calloc(nmemb, sizeof(fd_mask))) == NULL || in poll() 62 (writefds = calloc(nmemb, sizeof(fd_mask))) == NULL || in poll() 63 (exceptfds = calloc(nmemb, sizeof(fd_mask))) == NULL) { in poll()
|
/external/aac/libSYS/src/ |
D | genericStds.cpp | 397 UINT FDKfwrite(void *ptrf, INT size, UINT nmemb, FDKFILE *fp) { return fwrite(ptrf, size, nmemb, (F… in FDKfwrite() argument 400 UINT FDKfread(void *dst, INT size, UINT nmemb, FDKFILE *fp) { return fread(dst, size, nmemb, (FILE*… in FDKfread() argument 410 UINT FDKfwrite_EL(void *ptrf, INT size, UINT nmemb, FDKFILE *fp) { in FDKfwrite_EL() argument 413 FDKfwrite(ptrf, size, nmemb, fp); in FDKfwrite_EL() 420 for (n=0; n<nmemb; n++) { in FDKfwrite_EL() 428 return nmemb; in FDKfwrite_EL() 432 UINT FDKfread_EL(void *dst, INT size, UINT nmemb, FDKFILE *fp) { in FDKfread_EL() argument 441 for (n=0; n<nmemb; n++) { in FDKfread_EL() 455 err = nmemb; in FDKfread_EL() 458 if ((err = FDKfread(dst, size, nmemb, fp)) != nmemb) { in FDKfread_EL() [all …]
|
/external/valgrind/memcheck/tests/ |
D | undef_malloc_args.c | 28 size_t nmemb = 1; in main() local 29 (void) VALGRIND_MAKE_MEM_UNDEFINED(&nmemb, 1); in main() 30 new_p = calloc(nmemb, def_size); in main() 42 size_t nmemb = 16; in main() 45 new_p = memalign(nmemb, size); in main()
|
/external/compiler-rt/lib/asan/ |
D | asan_malloc_win.cc | 68 void *calloc(size_t nmemb, size_t size) { in calloc() argument 70 return asan_calloc(nmemb, size, &stack); in calloc() 74 void *_calloc_dbg(size_t nmemb, size_t size, int, const char *, int) { in _calloc_dbg() argument 75 return calloc(nmemb, size); in _calloc_dbg() 79 void *_calloc_impl(size_t nmemb, size_t size, int *errno_tmp) { in _calloc_impl() argument 80 return calloc(nmemb, size); in _calloc_impl()
|
D | asan_malloc_mac.cc | 124 INTERCEPTOR(void *, calloc, size_t nmemb, size_t size) { in INTERCEPTOR() argument 127 return asan_calloc(nmemb, size, &stack); in INTERCEPTOR() 176 void *__asan_mz_calloc(malloc_zone_t *zone, size_t nmemb, size_t size) { in __asan_mz_calloc() argument 182 size_t size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; in __asan_mz_calloc() 189 return asan_calloc(nmemb, size, &stack); in __asan_mz_calloc()
|
D | asan_malloc_linux.cc | 44 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { in INTERCEPTOR() argument 50 uptr size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; in INTERCEPTOR() 57 return asan_calloc(nmemb, size, &stack); in INTERCEPTOR()
|
/external/wpa_supplicant_8/src/utils/ |
D | os.h | 277 static inline void * os_calloc(size_t nmemb, size_t size) in os_calloc() argument 279 if (size && nmemb > (~(size_t) 0) / size) in os_calloc() 281 return os_zalloc(nmemb * size); in os_calloc() 565 static inline void * os_realloc_array(void *ptr, size_t nmemb, size_t size) in os_realloc_array() argument 567 if (size && nmemb > (~(size_t) 0) / size) in os_realloc_array() 569 return os_realloc(ptr, nmemb * size); in os_realloc_array() 579 static inline void os_remove_in_array(void *ptr, size_t nmemb, size_t size, in os_remove_in_array() argument 582 if (idx < nmemb - 1) in os_remove_in_array() 585 (nmemb - idx - 1) * size); in os_remove_in_array()
|
/external/mesa3d/src/mesa/main/ |
D | imports.c | 471 _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, in _mesa_bsearch() argument 477 while (nmemb) { in _mesa_bsearch() 478 nmemb >>= 1; in _mesa_bsearch() 479 mid = (char *)base + nmemb * size; in _mesa_bsearch() 485 --nmemb; in _mesa_bsearch() 490 return bsearch(key, base, nmemb, size, compar); in _mesa_bsearch()
|
/external/flac/include/FLAC/ |
D | callback.h | 102 typedef size_t (*FLAC__IOCallback_Read) (void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handl… 115 typedef size_t (*FLAC__IOCallback_Write) (const void *ptr, size_t size, size_t nmemb, FLAC__IOHandl…
|
/external/valgrind/coregrind/m_replacemalloc/ |
D | vg_replace_malloc.c | 581 ( void *zone, SizeT nmemb, SizeT size ); \ 583 ( void *zone, SizeT nmemb, SizeT size ) \ 589 TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(nmemb); \ 591 MALLOC_TRACE("zone_calloc(%p, %llu,%llu)", zone, (ULong)nmemb, (ULong)size ); \ 593 v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_calloc, nmemb, size ); \ 601 ( SizeT nmemb, SizeT size ); \ 603 ( SizeT nmemb, SizeT size ) \ 608 MALLOC_TRACE("calloc(%llu,%llu)", (ULong)nmemb, (ULong)size ); \ 619 if (umulHW(size, nmemb) != 0) return NULL; \ 620 v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_calloc, nmemb, size ); \
|
/external/flac/include/share/ |
D | alloc.h | 77 static inline void *safe_calloc_(size_t nmemb, size_t size) in safe_calloc_() argument 79 if(!nmemb || !size) in safe_calloc_() 81 return calloc(nmemb, size); in safe_calloc_()
|
/external/compiler-rt/lib/lsan/ |
D | lsan_interceptors.cc | 62 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { in INTERCEPTOR() argument 68 uptr size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; in INTERCEPTOR() 74 if (CallocShouldReturnNullDueToOverflow(size, nmemb)) return 0; in INTERCEPTOR() 77 size *= nmemb; in INTERCEPTOR()
|
/external/aac/libSYS/include/ |
D | genericStds.h | 443 UINT FDKfwrite(void *ptrf, INT size, UINT nmemb, FDKFILE *fp); 444 UINT FDKfread(void *dst, INT size, UINT nmemb, FDKFILE *fp); 457 UINT FDKfwrite_EL(void *ptrf, INT size, UINT nmemb, FDKFILE *fp); 468 UINT FDKfread_EL(void *dst, INT size, UINT nmemb, FDKFILE *fp);
|
/external/compiler-rt/lib/msan/ |
D | msan_allocator.cc | 153 void *MsanCalloc(StackTrace *stack, uptr nmemb, uptr size) { in MsanCalloc() argument 155 if (CallocShouldReturnNullDueToOverflow(size, nmemb)) in MsanCalloc() 157 return MsanReallocate(stack, 0, nmemb * size, sizeof(u64), true); in MsanCalloc()
|
/external/compiler-rt/lib/sanitizer_common/tests/ |
D | sanitizer_allocator_testlib.cc | 88 void *calloc(size_t nmemb, size_t size) { in calloc() argument 91 size *= nmemb; in calloc()
|
/external/libcxx/include/ |
D | cstdlib | 48 void* calloc(size_t nmemb, size_t size); 58 void* bsearch(const void* key, const void* base, size_t nmemb, size_t size, 60 void qsort(void* base, size_t nmemb, size_t size,
|
/external/clang/test/Analysis/ |
D | unix-fns.c | 105 void test_calloc_nowarn(size_t nmemb, size_t size) { in test_calloc_nowarn() argument 106 char *foo = calloc(nmemb, size); // no-warning in test_calloc_nowarn()
|
D | malloc-sizeof.cpp | 6 void *calloc(size_t nmemb, size_t size);
|
/external/google-breakpad/src/common/linux/ |
D | libcurl_wrapper.cc | 101 size_t nmemb, void *userp) { in WriteCallback() argument 106 size_t real_size = size * nmemb; in WriteCallback()
|
D | http_upload.cc | 40 size_t nmemb, void *userp) { in WriteCallback() argument 45 size_t real_size = size * nmemb; in WriteCallback()
|
/external/fio/ |
D | smalloc.c | 487 void *scalloc(size_t nmemb, size_t size) in scalloc() argument 491 ret = smalloc(nmemb * size); in scalloc() 493 memset(ret, 0, nmemb * size); in scalloc()
|