/external/webp/src/utils/ |
utils.c | 22 // Returns 0 in case of overflow of nmemb * size. 23 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) { 24 const uint64_t total_size = nmemb * size; 25 if (nmemb == 0) return 1; 26 if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0; 31 void* WebPSafeMalloc(uint64_t nmemb, size_t size) { 32 if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL; 33 assert(nmemb * size > 0); 34 return malloc((size_t)(nmemb * size)); 37 void* WebPSafeCalloc(uint64_t nmemb, size_t size) [all...] |
utils.h | 36 void* WebPSafeMalloc(uint64_t nmemb, size_t size); 39 void* WebPSafeCalloc(uint64_t nmemb, size_t size);
|
/external/openssh/ |
xmalloc.c | 41 xcalloc(size_t nmemb, size_t size) 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) 60 size_t new_size = nmemb * size; 64 if (SIZE_T_MAX / nmemb < size) 65 fatal("xrealloc: nmemb * size > SIZE_T_MAX") [all...] |
/packages/inputmethods/PinyinIME/jni/include/ |
mystdlib.h | 28 size_t nmemb, size_t size,
|
/bionic/libc/upstream-netbsd/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 | 96 * \param nmemb The number of records to be read. 101 typedef size_t (*FLAC__IOCallback_Read) (void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle); 109 * \param nmemb The number of records to be written. 114 typedef size_t (*FLAC__IOCallback_Write) (const void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle);
|
/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.4.3/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);
|
/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/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);
|
/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/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/compiler-rt/lib/asan/ |
asan_malloc_win.cc | 55 void *calloc(size_t nmemb, size_t size) { 57 return asan_calloc(nmemb, size, &stack); 64 void *_calloc_impl(size_t nmemb, size_t size, int *errno_tmp) { 65 return calloc(nmemb, size);
|
asan_malloc_linux.cc | 27 DECLARE_REAL_AND_INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) 77 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { 83 uptr size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; 90 return asan_calloc(nmemb, size, &stack);
|
asan_malloc_mac.cc | 114 INTERCEPTOR(void *, calloc, size_t nmemb, size_t size) { 117 return asan_calloc(nmemb, size, &stack); 160 void *mz_calloc(malloc_zone_t *zone, size_t nmemb, size_t size) { 166 size_t size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; 173 return asan_calloc(nmemb, size, &stack);
|
/external/openssh/openbsd-compat/ |
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) {
|
/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/qemu/distrib/sdl-1.2.15/src/stdlib/ |
SDL_qsort.c | 242 last=first + (nmemb>limit ? limit : nmemb-1)*sz;\ 250 last=((char*)base)+nmemb*size; \ 320 static void qsort_nonaligned(void *base, size_t nmemb, size_t size, 330 first=(char*)base; last=first+(nmemb-1)*size; 351 static void qsort_aligned(void *base, size_t nmemb, size_t size, 361 first=(char*)base; last=first+(nmemb-1)*size; 382 static void qsort_words(void *base, size_t nmemb, 391 first=(char*)base; last=first+(nmemb-1)*WORD_BYTES; 417 last=((char*)base)+nmemb*WORD_BYTES [all...] |
/external/clang/test/Analysis/ |
malloc.cpp | 7 void *calloc(size_t nmemb, size_t size);
|
malloc-sizeof.c | 6 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);
|
/external/valgrind/main/coregrind/ |
pub_core_replacemalloc.h | 47 void* (*tl_calloc) (ThreadId tid, SizeT nmemb, SizeT n);
|
pub_core_mallocfree.h | 109 SizeT nmemb, SizeT bytes_per_memb );
|
/ndk/sources/host-tools/sed-4.2.1/sed/ |
utils.h | 27 void ck_fwrite P_((const VOID *ptr, size_t size, size_t nmemb, FILE *stream)); 28 size_t ck_fread P_((VOID *ptr, size_t size, size_t nmemb, FILE *stream));
|
utils.c | 238 ck_fwrite(ptr, size, nmemb, stream) 241 size_t nmemb; 245 if (size && fwrite(ptr, size, nmemb, stream) != nmemb) 247 "couldn't write %d items to %s: %s", nmemb), 248 nmemb, utils_fp_name(stream), strerror(errno)); 253 ck_fread(ptr, size, nmemb, stream) 256 size_t nmemb; 260 if (size && (nmemb=fread(ptr, size, nmemb, stream)) <= 0 && ferror(stream) [all...] |
/external/wpa_supplicant_8/src/utils/ |
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) 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) 491 if (size && nmemb > (~(size_t) 0) / size) 493 return os_realloc(ptr, nmemb * size);
|
/external/valgrind/main/exp-sgcheck/ |
h_main.h | 63 void* h_replace_calloc ( ThreadId tid, SizeT nmemb, SizeT size1 );
|
/external/valgrind/main/coregrind/m_replacemalloc/ |
vg_replace_malloc.c | 551 ( void *zone, SizeT nmemb, SizeT size ); \ 553 ( void *zone, SizeT nmemb, SizeT size ) \ 558 MALLOC_TRACE("zone_calloc(%p, %llu,%llu)", zone, (ULong)nmemb, (ULong)size ); \ 560 v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_calloc, nmemb, size ); \ 568 ( SizeT nmemb, SizeT size ); \ 570 ( SizeT nmemb, SizeT size ) \ 575 MALLOC_TRACE("calloc(%llu,%llu)", (ULong)nmemb, (ULong)size ); \ 586 if (umulHW(size, nmemb) != 0) return NULL; \ 587 v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_calloc, nmemb, size ); \ [all...] |