/bionic/libc/upstream-openbsd/lib/libc/stdlib/ |
reallocarray.c | 30 reallocarray(void *optr, size_t nmemb, size_t size) 32 if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && 33 nmemb > 0 && SIZE_MAX / nmemb < size) { 37 return realloc(optr, size * nmemb);
|
/external/openssh/openbsd-compat/ |
reallocarray.c | 37 reallocarray(void *optr, size_t nmemb, size_t size) 39 if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && 40 nmemb > 0 && SIZE_MAX / nmemb < size) { 44 return realloc(optr, size * nmemb);
|
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/openssh/ |
xmalloc.c | 43 xcalloc(size_t nmemb, size_t size) 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) 62 size_t new_size = nmemb * size; 66 if (SIZE_MAX / nmemb < size) 67 fatal("xrealloc: nmemb * size > SIZE_MAX") [all...] |
/external/valgrind/memcheck/tests/ |
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/webp/src/utils/ |
utils.c | 163 // Returns 0 in case of overflow of nmemb * size. 164 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) { 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) { 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 * size)) [all...] |
utils.h | 38 WEBP_EXTERN(void*) WebPSafeMalloc(uint64_t nmemb, size_t size); 41 WEBP_EXTERN(void*) WebPSafeCalloc(uint64_t nmemb, size_t size);
|
/bionic/libc/upstream-netbsd/lib/libc/stdlib/ |
bsearch.c | 62 bsearch(const void *key, const void *base0, size_t nmemb, size_t size, 71 _DIAGASSERT(base0 != NULL || nmemb == 0); 74 for (lim = nmemb; lim != 0; lim >>= 1) {
|
/external/flac/include/FLAC/ |
callback.h | 97 * \param nmemb The number of records to be read. 102 typedef size_t (*FLAC__IOCallback_Read) (void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle); 110 * \param nmemb The number of records to be written. 115 typedef size_t (*FLAC__IOCallback_Write) (const void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle);
|
/external/compiler-rt/lib/asan/ |
asan_malloc_win.cc | 68 void *calloc(size_t nmemb, size_t size) { 70 return asan_calloc(nmemb, size, &stack); 74 void *_calloc_dbg(size_t nmemb, size_t size, int, const char *, int) { 75 return calloc(nmemb, size); 79 void *_calloc_impl(size_t nmemb, size_t size, int *errno_tmp) { 80 return calloc(nmemb, size);
|
asan_malloc_mac.cc | 124 INTERCEPTOR(void *, calloc, size_t nmemb, size_t size) { 127 return asan_calloc(nmemb, size, &stack); 176 void *__asan_mz_calloc(malloc_zone_t *zone, size_t nmemb, size_t size) { 182 size_t size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; 189 return asan_calloc(nmemb, size, &stack);
|
asan_malloc_linux.cc | 44 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { 50 uptr size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; 57 return asan_calloc(nmemb, size, &stack);
|
/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8/sysroot/usr/include/ |
af_vfs.h | 49 size_t af_fread (void *data, size_t size, size_t nmemb, AFvirtualfile *vfile); 50 size_t af_fwrite (const void *data, size_t size, size_t nmemb, AFvirtualfile *vfile);
|
/external/aac/libSYS/src/ |
genericStds.cpp | 392 UINT FDKfwrite(void *ptrf, INT size, UINT nmemb, FDKFILE *fp) { return fwrite(ptrf, size, nmemb, (FILE*)fp); } 395 UINT FDKfread(void *dst, INT size, UINT nmemb, FDKFILE *fp) { return fread(dst, size, nmemb, (FILE*)fp); } 405 UINT FDKfwrite_EL(void *ptrf, INT size, UINT nmemb, FDKFILE *fp) { 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) { 436 for (n=0; n<nmemb; n++) [all...] |
/external/clang/test/Analysis/ |
malloc-sizeof.cpp | 6 void *calloc(size_t nmemb, size_t size);
|
malloc-sizeof.c | 6 void *calloc(size_t nmemb, size_t size);
|
malloc.cpp | 7 void *calloc(size_t nmemb, size_t size);
|
stream.c | 11 extern size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
|
unix-fns.c | 105 void test_calloc_nowarn(size_t nmemb, size_t size) { 106 char *foo = calloc(nmemb, size); // no-warning [all...] |
/external/wpa_supplicant_8/src/utils/ |
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) 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) 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_t size [all...] |
/external/valgrind/coregrind/ |
pub_core_replacemalloc.h | 48 void* (*tl_calloc) (ThreadId tid, SizeT nmemb, SizeT n);
|
/external/flac/include/share/ |
alloc.h | 77 static inline void *safe_calloc_(size_t nmemb, size_t size) 79 if(!nmemb || !size) 81 return calloc(nmemb, size);
|
/external/mesa3d/src/mesa/main/ |
imports.c | 471 _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, 477 while (nmemb) { 478 nmemb >>= 1; 479 mid = (char *)base + nmemb * size; 485 --nmemb; 490 return bsearch(key, base, nmemb, size, compar);
|
/external/compiler-rt/lib/lsan/ |
lsan_interceptors.cc | 62 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { 68 uptr size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; 74 if (CallocShouldReturnNullDueToOverflow(size, nmemb)) return 0; 77 size *= nmemb;
|
/external/valgrind/exp-sgcheck/ |
h_main.h | 63 void* h_replace_calloc ( ThreadId tid, SizeT nmemb, SizeT size1 );
|