Searched refs:nmemb (Results 1 - 25 of 80) sorted by relevance

1234

/external/chromium_org/third_party/libwebp/utils/
H A Dutils.c24 // Returns 0 in case of overflow of nmemb * size.
25 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) { argument
26 const uint64_t total_size = nmemb * size;
27 if (nmemb == 0) return 1;
28 if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0;
33 void* WebPSafeMalloc(uint64_t nmemb, size_t size) { argument
34 if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL;
35 assert(nmemb * size > 0);
36 return malloc((size_t)(nmemb * size));
39 void* WebPSafeCalloc(uint64_t nmemb, size_ argument
[all...]
H A Dutils.h38 void* WebPSafeMalloc(uint64_t nmemb, size_t size);
41 void* WebPSafeCalloc(uint64_t nmemb, size_t size);
/external/webp/src/utils/
H A Dutils.c24 // Returns 0 in case of overflow of nmemb * size.
25 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) { argument
26 const uint64_t total_size = nmemb * size;
27 if (nmemb == 0) return 1;
28 if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0;
33 void* WebPSafeMalloc(uint64_t nmemb, size_t size) { argument
34 if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL;
35 assert(nmemb * size > 0);
36 return malloc((size_t)(nmemb * size));
39 void* WebPSafeCalloc(uint64_t nmemb, size_ argument
[all...]
H A Dutils.h38 void* WebPSafeMalloc(uint64_t nmemb, size_t size);
41 void* WebPSafeCalloc(uint64_t nmemb, size_t size);
/external/openssh/
H A Dxmalloc.c41 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...]
/external/flac/include/FLAC/
H A Dcallback.h96 * \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);
/external/compiler-rt/lib/asan/
H A Dasan_malloc_win.cc57 void *calloc(size_t nmemb, size_t size) { argument
59 return asan_calloc(nmemb, size, &stack);
66 void *_calloc_impl(size_t nmemb, size_t size, int *errno_tmp) { argument
67 return calloc(nmemb, size);
H A Dasan_malloc_linux.cc28 DECLARE_REAL_AND_INTERCEPTOR(void*, calloc, uptr nmemb, uptr size)
78 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { argument
84 uptr size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize;
91 return asan_calloc(nmemb, size, &stack);
H A Dasan_malloc_mac.cc124 INTERCEPTOR(void *, calloc, size_t nmemb, size_t size) { argument
127 return asan_calloc(nmemb, size, &stack);
170 void *mz_calloc(malloc_zone_t *zone, size_t nmemb, size_t size) { argument
176 size_t size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize;
183 return asan_calloc(nmemb, size, &stack);
/external/openssh/openbsd-compat/
H A Dbsd-poll.c45 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/
H A DgenericStds.cpp392 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/qemu/distrib/sdl-1.2.15/src/stdlib/
H A DSDL_qsort.c242 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, argument
330 first=(char*)base; last=first+(nmemb-1)*size;
351 static void qsort_aligned(void *base, size_t nmemb, size_t size, argument
361 first=(char*)base; last=first+(nmemb-1)*size;
382 static void qsort_words(void *base, size_t nmemb, argument
391 first=(char*)base; last=first+(nmemb-1)*WORD_BYTES;
417 last=((char*)base)+nmemb*WORD_BYTE
431 qsort(void *base, size_t nmemb, size_t size, int (*compare)(const void *, const void *)) argument
[all...]
/external/valgrind/main/coregrind/
H A Dpub_core_replacemalloc.h47 void* (*tl_calloc) (ThreadId tid, SizeT nmemb, SizeT n);
H A Dpub_core_mallocfree.h109 SizeT nmemb, SizeT bytes_per_memb );
/external/chromium_org/third_party/yasm/source/patched-yasm/libyasm/
H A Dmergesort.c102 yasm__mergesort(void *base, size_t nmemb, size_t size, argument
106 return mergesort(base, nmemb, size, cmp);
121 if (nmemb == 0)
132 if ((list2 = yasm_xmalloc(nmemb * size + PSIZE)) == NULL)
136 setup(list1, list2, nmemb, size, cmp);
137 last = list2 + nmemb * size;
233 last = list2 + nmemb*size;
236 memmove(list2, list1, nmemb*size);
/external/wpa_supplicant_8/hostapd/src/utils/
H A Dos.h185 * @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);
/external/wpa_supplicant_8/src/utils/
H A Dos.h185 * @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);
/external/wpa_supplicant_8/wpa_supplicant/src/utils/
H A Dos.h185 * @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);
/external/chromium_org/third_party/mesa/src/src/mesa/main/
H A Dimports.c471 _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/mesa3d/src/mesa/main/
H A Dimports.c471 _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/clang/test/Analysis/
H A Dmalloc-sizeof.c6 void *calloc(size_t nmemb, size_t size);
H A Dmalloc.cpp7 void *calloc(size_t nmemb, size_t size);
H A Dstream.c11 extern size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
/external/valgrind/main/exp-sgcheck/
H A Dh_main.h63 void* h_replace_calloc ( ThreadId tid, SizeT nmemb, SizeT size1 );
/external/valgrind/main/coregrind/m_replacemalloc/
H A Dvg_replace_malloc.c551 ( 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 ); \

Completed in 591 milliseconds

1234