/third_party/mesa3d/src/util/ |
D | u_qsort.h | 35 void util_tls_qsort_r(void *base, size_t nmemb, size_t size, 55 util_qsort_r(void *base, size_t nmemb, size_t size, in util_qsort_r() argument 68 qsort_r(base, nmemb, size, &data, util_qsort_adapter); in util_qsort_r() 71 qsort_r(base, nmemb, size, compar, arg); in util_qsort_r() 82 qsort_s(base, nmemb, size, util_qsort_adapter, &data); in util_qsort_r() 85 qsort_s(base, nmemb, size, compar, arg); in util_qsort_r() 89 util_tls_qsort_r(base, nmemb, size, compar, arg); in util_qsort_r()
|
/third_party/curl/tests/libtest/ |
D | lib1509.c | 28 size_t WriteOutput(void *ptr, size_t size, size_t nmemb, void *stream); 29 size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream); 83 size_t WriteOutput(void *ptr, size_t size, size_t nmemb, void *stream) in WriteOutput() argument 85 fwrite(ptr, size, nmemb, stream); in WriteOutput() 86 return nmemb * size; in WriteOutput() 89 size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream) in WriteHeader() argument 94 realHeaderSize += curlx_uztoul(size * nmemb); in WriteHeader() 96 return nmemb * size; in WriteHeader()
|
D | lib1540.c | 57 static size_t header_callback(void *ptr, size_t size, size_t nmemb, in header_callback() argument 60 size_t len = size * nmemb; in header_callback() 62 (void)fwrite(ptr, size, nmemb, stdout); in header_callback() 66 static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp) in write_callback() argument 69 size_t len = size * nmemb; in write_callback() 74 fwrite(ptr, size, nmemb, stdout); in write_callback()
|
/third_party/giflib/ |
D | openbsd-reallocarray.c | 22 openbsd_reallocarray(void *optr, size_t nmemb, size_t size) in openbsd_reallocarray() argument 24 if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && in openbsd_reallocarray() 25 nmemb > 0 && SIZE_MAX / nmemb < size) { in openbsd_reallocarray() 71 if (size == 0 || nmemb == 0) in openbsd_reallocarray() 73 return realloc(optr, size * nmemb); in openbsd_reallocarray()
|
/third_party/skia/third_party/externals/libwebp/src/utils/ |
D | utils.c | 171 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) { in CheckSizeArgumentsOverflow() argument 172 const uint64_t total_size = nmemb * size; in CheckSizeArgumentsOverflow() 173 if (nmemb == 0) return 1; in CheckSizeArgumentsOverflow() 174 if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0; in CheckSizeArgumentsOverflow() 194 void* WebPSafeMalloc(uint64_t nmemb, size_t size) { in WebPSafeMalloc() argument 197 if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL; in WebPSafeMalloc() 198 assert(nmemb * size > 0); in WebPSafeMalloc() 199 ptr = malloc((size_t)(nmemb * size)); in WebPSafeMalloc() 200 AddMem(ptr, (size_t)(nmemb * size)); in WebPSafeMalloc() 204 void* WebPSafeCalloc(uint64_t nmemb, size_t size) { in WebPSafeCalloc() argument [all …]
|
/third_party/flutter/skia/third_party/externals/libwebp/src/utils/ |
D | utils.c | 168 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) { in CheckSizeArgumentsOverflow() argument 169 const uint64_t total_size = nmemb * size; in CheckSizeArgumentsOverflow() 170 if (nmemb == 0) return 1; in CheckSizeArgumentsOverflow() 171 if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0; in CheckSizeArgumentsOverflow() 191 void* WebPSafeMalloc(uint64_t nmemb, size_t size) { in WebPSafeMalloc() argument 194 if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL; in WebPSafeMalloc() 195 assert(nmemb * size > 0); in WebPSafeMalloc() 196 ptr = malloc((size_t)(nmemb * size)); in WebPSafeMalloc() 197 AddMem(ptr, (size_t)(nmemb * size)); in WebPSafeMalloc() 201 void* WebPSafeCalloc(uint64_t nmemb, size_t size) { in WebPSafeCalloc() argument [all …]
|
/third_party/python/Modules/_decimal/libmpdec/ |
D | mpalloc.c | 52 void *(* mpd_callocfunc)(size_t nmemb, size_t size) = calloc; 58 mpd_callocfunc_em(size_t nmemb, size_t size) in mpd_callocfunc_em() argument 64 req = mul_size_t_overflow((mpd_size_t)nmemb, (mpd_size_t)size, in mpd_callocfunc_em() 83 mpd_alloc(mpd_size_t nmemb, mpd_size_t size) in mpd_alloc() argument 87 req = mul_size_t_overflow(nmemb, size, &overflow); in mpd_alloc() 97 mpd_calloc(mpd_size_t nmemb, mpd_size_t size) in mpd_calloc() argument 101 (void)mul_size_t_overflow(nmemb, size, &overflow); in mpd_calloc() 106 return mpd_callocfunc(nmemb, size); in mpd_calloc() 111 mpd_realloc(void *ptr, mpd_size_t nmemb, mpd_size_t size, uint8_t *err) in mpd_realloc() argument 116 req = mul_size_t_overflow(nmemb, size, &overflow); in mpd_realloc() [all …]
|
/third_party/flutter/skia/third_party/externals/sdl/src/stdlib/ |
D | SDL_qsort.c | 33 SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *)) in SDL_qsort() argument 35 qsort(base, nmemb, size, compare); in SDL_qsort() 323 last=first + ((nmemb>limit ? limit : nmemb)-1)*sz;\ 331 last=((char*)base)+nmemb*size; \ 404 static void qsort_nonaligned(void *base, size_t nmemb, size_t size, in qsort_nonaligned() argument 414 first=(char*)base; last=first+(nmemb-1)*size; in qsort_nonaligned() 435 static void qsort_aligned(void *base, size_t nmemb, size_t size, in qsort_aligned() argument 445 first=(char*)base; last=first+(nmemb-1)*size; in qsort_aligned() 466 static void qsort_words(void *base, size_t nmemb, in qsort_words() argument 475 first=(char*)base; last=first+(nmemb-1)*WORD_BYTES; in qsort_words() [all …]
|
/third_party/quickjs/ |
D | cutils.c | 319 void rqsort(void *base, size_t nmemb, size_t size, 325 qsort(base, nmemb, size, rqsort_cmp2); 470 static void heapsortx(void *base, size_t nmemb, size_t size, cmp_f cmp, void *opaque) in heapsortx() argument 476 if (nmemb > 1) { in heapsortx() 477 i = (nmemb / 2) * size; in heapsortx() 478 n = nmemb * size; in heapsortx() 512 void rqsort(void *base, size_t nmemb, size_t size, cmp_f cmp, void *opaque) in rqsort() argument 521 if (nmemb < 2 || size <= 0) in rqsort() 525 sp->count = nmemb; in rqsort() 532 nmemb = sp->count; in rqsort() [all …]
|
/third_party/curl/docs/examples/ |
D | ftpuploadresume.c | 32 static size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, in getcontentlengthfunc() argument 42 return size * nmemb; in getcontentlengthfunc() 46 static size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream) in discardfunc() argument 50 return size * nmemb; in discardfunc() 54 static size_t readfunc(char *ptr, size_t size, size_t nmemb, void *stream) in readfunc() argument 62 n = fread(ptr, size, nmemb, f) * size; in readfunc()
|
D | imap-append.c | 60 static size_t payload_source(char *ptr, size_t size, size_t nmemb, void *userp) in payload_source() argument 64 size_t room = size * nmemb; in payload_source() 66 if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) { in payload_source()
|
/third_party/skia/third_party/externals/microhttpd/src/testcurl/ |
D | test_timeout.c | 87 putBuffer (void *stream, size_t size, size_t nmemb, void *ptr) in putBuffer() argument 92 wrt = size * nmemb; in putBuffer() 102 putBuffer_fail (void *stream, size_t size, size_t nmemb, void *ptr) in putBuffer_fail() argument 109 copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) in copyBuffer() argument 113 if (cbc->pos + size * nmemb > cbc->size) in copyBuffer() 115 memcpy (&cbc->buf[cbc->pos], ptr, size * nmemb); in copyBuffer() 116 cbc->pos += size * nmemb; in copyBuffer() 117 return size * nmemb; in copyBuffer()
|
/third_party/musl/porting/liteos_m/kernel/src/stdio/ |
D | fread.c | 6 size_t fread(void *restrict destv, size_t size, size_t nmemb, FILE *restrict f) in fread() argument 9 size_t len = size*nmemb, l = len, k; in fread() 10 if (!size) nmemb = 0; in fread() 35 return nmemb; in fread()
|
D | fwrite.c | 28 size_t fwrite(const void *restrict src, size_t size, size_t nmemb, FILE *restrict f) in fwrite() argument 30 size_t k, l = size*nmemb; in fwrite() 31 if (!size) nmemb = 0; in fwrite() 35 return k==l ? nmemb : k/size; in fwrite()
|
/third_party/musl/porting/uniproton/kernel/src/stdio/ |
D | fread.c | 6 size_t fread(void *restrict destv, size_t size, size_t nmemb, FILE *restrict f) in fread() argument 9 size_t len = size*nmemb, l = len, k; in fread() 10 if (!size) nmemb = 0; in fread() 35 return nmemb; in fread()
|
D | fwrite.c | 28 size_t fwrite(const void *restrict src, size_t size, size_t nmemb, FILE *restrict f) in fwrite() argument 30 size_t k, l = size*nmemb; in fwrite() 31 if (!size) nmemb = 0; in fwrite() 35 return k==l ? nmemb : k/size; in fwrite()
|
/third_party/musl/src/stdio/ |
D | fread.c | 6 size_t fread(void *restrict destv, size_t size, size_t nmemb, FILE *restrict f) in fread() argument 9 size_t len = size*nmemb, l = len, k; in fread() 10 if (!size) nmemb = 0; in fread() 35 return nmemb; in fread()
|
D | fwrite.c | 28 size_t fwrite(const void *restrict src, size_t size, size_t nmemb, FILE *restrict f) in fwrite() argument 30 size_t k, l = size*nmemb; in fwrite() 31 if (!size) nmemb = 0; in fwrite() 35 return k==l ? nmemb : k/size; in fwrite()
|
/third_party/musl/porting/liteos_a/kernel/src/stdio/ |
D | fread.c | 6 size_t fread(void *restrict destv, size_t size, size_t nmemb, FILE *restrict f) in fread() argument 9 size_t len = size*nmemb, l = len, k; in fread() 10 if (!size) nmemb = 0; in fread() 35 return nmemb; in fread()
|
D | fwrite.c | 28 size_t fwrite(const void *restrict src, size_t size, size_t nmemb, FILE *restrict f) in fwrite() argument 30 size_t k, l = size*nmemb; in fwrite() 31 if (!size) nmemb = 0; in fwrite() 35 return k==l ? nmemb : k/size; in fwrite()
|
/third_party/node/deps/nghttp2/lib/ |
D | nghttp2_mem.c | 39 static void *default_calloc(size_t nmemb, size_t size, void *mem_user_data) { in default_calloc() argument 42 return calloc(nmemb, size); in default_calloc() 68 void *nghttp2_mem_calloc(nghttp2_mem *mem, size_t nmemb, size_t size) { in nghttp2_mem_calloc() argument 69 return mem->calloc(nmemb, size, mem->mem_user_data); in nghttp2_mem_calloc()
|
/third_party/nghttp2/lib/ |
D | nghttp2_mem.c | 39 static void *default_calloc(size_t nmemb, size_t size, void *mem_user_data) { in default_calloc() argument 42 return calloc(nmemb, size); in default_calloc() 68 void *nghttp2_mem_calloc(nghttp2_mem *mem, size_t nmemb, size_t size) { in nghttp2_mem_calloc() argument 69 return mem->calloc(nmemb, size, mem->mem_user_data); in nghttp2_mem_calloc()
|
/third_party/ffmpeg/libavutil/ |
D | mem.c | 182 void *av_malloc_array(size_t nmemb, size_t size) in av_malloc_array() argument 185 if (av_size_mult(nmemb, size, &result) < 0) in av_malloc_array() 190 void *av_mallocz_array(size_t nmemb, size_t size) in av_mallocz_array() argument 193 if (av_size_mult(nmemb, size, &result) < 0) in av_mallocz_array() 198 void *av_realloc_array(void *ptr, size_t nmemb, size_t size) in av_realloc_array() argument 201 if (av_size_mult(nmemb, size, &result) < 0) in av_realloc_array() 206 int av_reallocp_array(void *ptr, size_t nmemb, size_t size) in av_reallocp_array() argument 211 val = av_realloc_f(val, nmemb, size); in av_reallocp_array() 213 if (!val && nmemb && size) in av_reallocp_array() 245 void *av_calloc(size_t nmemb, size_t size) in av_calloc() argument [all …]
|
/third_party/mbedtls/tests/configs/ |
D | config-wrapper-malloc-0-null.h | 24 static inline void *custom_calloc( size_t nmemb, size_t size ) in custom_calloc() argument 26 if( nmemb == 0 || size == 0 ) in custom_calloc() 28 return( calloc( nmemb, size ) ); in custom_calloc()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/utils/ |
D | os.h | 278 static inline void * os_calloc(size_t nmemb, size_t size) in os_calloc() argument 280 if (size && nmemb > (~(size_t) 0) / size) in os_calloc() 282 return os_zalloc(nmemb * size); in os_calloc() 566 static inline void * os_realloc_array(void *ptr, size_t nmemb, size_t size) in os_realloc_array() argument 568 if (size && nmemb > (~(size_t) 0) / size) in os_realloc_array() 570 return os_realloc(ptr, nmemb * size); in os_realloc_array() 580 static inline void os_remove_in_array(void *ptr, size_t nmemb, size_t size, in os_remove_in_array() argument 583 if (idx < nmemb - 1) in os_remove_in_array() 586 (nmemb - idx - 1) * size); in os_remove_in_array()
|