HomeSort by relevance Sort by last modified time
    Searched full:nmemb (Results 1 - 25 of 322) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /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/opencv3/3rdparty/libwebp/utils/
utils.c 24 // Returns 0 in case of overflow of nmemb * size.
25 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) {
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) {
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_t size)
    [all...]
  /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/curl/tests/libtest/
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)
85 fwrite(ptr, size, nmemb, stream);
86 return nmemb * size;
89 size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream)
94 realHeaderSize += curlx_uztoul(size * nmemb);
96 return nmemb * size;
lib1520.c 50 static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
55 if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
lib1514.c 38 static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
42 if(size*nmemb < 1)
lib513.c 26 static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
30 (void)nmemb;
  /external/strace/
xmalloc.c 51 void *xcalloc(size_t nmemb, size_t size)
53 void *p = calloc(nmemb, size);
63 void *xreallocarray(void *ptr, size_t nmemb, size_t size)
65 size_t bytes = nmemb * size;
67 if ((nmemb | size) >= HALF_SIZE_T &&
68 size && bytes / size != nmemb)
  /external/curl/src/
tool_cb_wrt.c 75 size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata)
85 * point returning a value different from sz*nmemb indicates failure.
87 const size_t failure = (sz * nmemb) ? 0 : 1;
94 if(sz * nmemb > (size_t)CURL_MAX_HTTP_HEADER) {
101 if(sz * nmemb > (size_t)CURL_MAX_WRITE_SIZE) {
140 rc = fwrite(buffer, sz, nmemb, outs->stream);
142 if((sz * nmemb) == rc)
144 outs->bytes += (sz * nmemb);
tool_cb_rea.c 37 size_t tool_read_cb(void *buffer, size_t sz, size_t nmemb, void *userdata)
42 rc = read(in->fd, buffer, sz*nmemb);
tool_cb_rea.h 30 size_t tool_read_cb(void *buffer, size_t sz, size_t nmemb, void *userdata);
  /external/opencv3/3rdparty/include/ffmpeg_/libavutil/
mem.h 86 * Helper function to allocate a block of size * nmemb bytes with
88 * @param nmemb Number of elements
94 av_alloc_size(1, 2) static inline void *av_malloc_array(size_t nmemb, size_t size)
96 if (size <= 0 || nmemb >= INT_MAX / size)
98 return av_malloc(nmemb * size);
127 * If ptr is NULL and nmemb > 0, allocate a new block. If
128 * nmemb is zero, free the memory block pointed to by ptr.
131 * @param nmemb Number of elements
136 av_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb, size_t size);
140 * If *ptr is NULL and nmemb > 0, allocate a new block. I
    [all...]
  /external/curl/docs/examples/
curlgtk.c 19 size_t my_write_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
21 return fwrite(ptr, size, nmemb, stream);
24 size_t my_read_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
26 return fread(ptr, size, nmemb, stream);
ftpuploadresume.c 48 size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream)
54 r = _snscanf(ptr, size * nmemb, "Content-Length: %ld\n", &len);
59 return size * nmemb;
63 size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream)
65 return size * nmemb;
69 size_t readfunc(void *ptr, size_t size, size_t nmemb, void *stream)
77 n = fread(ptr, size, nmemb, f) * size;
ftp-wildcard.c 35 static size_t write_it(char *buff, size_t size, size_t nmemb,
137 static size_t write_it(char *buff, size_t size, size_t nmemb,
143 written = fwrite(buff, size, nmemb, data->output);
146 written = fwrite(buff, size, nmemb, stdout);
certinfo.c 26 static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
30 return size * nmemb;
href_extractor.c 37 static size_t write_callback(void *buffer, size_t size, size_t nmemb,
40 size_t realsize = size * nmemb, p;
sepheaders.c 28 static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
30 int written = fwrite(ptr, size, nmemb, (FILE *)stream);
url2file.c 28 static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
30 size_t written = fwrite(ptr, size, nmemb, (FILE *)stream);
  /external/opencv3/3rdparty/libjasper/
jas_malloc.c 124 void *jas_realloc2(void *ptr, size_t nmemb, size_t size)
127 return jas_alloc2(nmemb, size);
128 if (nmemb && SIZE_MAX / nmemb < size) {
132 return jas_realloc(ptr, nmemb * size);
136 void *jas_alloc2(size_t nmemb, size_t size)
138 if (nmemb && SIZE_MAX / nmemb < size) {
143 return jas_malloc(nmemb * size);
158 void *jas_calloc(size_t nmemb, size_t size
    [all...]
  /external/webp/src/utils/
utils.c 165 // Returns 0 in case of overflow of nmemb * size.
166 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) {
167 const uint64_t total_size = nmemb * size;
168 if (nmemb == 0) return 1;
169 if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0;
185 void* WebPSafeMalloc(uint64_t nmemb, size_t size) {
188 if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL;
189 assert(nmemb * size > 0);
190 ptr = malloc((size_t)(nmemb * size));
191 AddMem(ptr, (size_t)(nmemb * size))
    [all...]
  /external/avahi/avahi-glib/
glib-malloc.c 37 static void* calloc_glue(size_t nmemb, size_t size) {
38 return g_malloc0(nmemb * size);
  /external/libmicrohttpd/src/testcurl/
test_timeout.c 87 putBuffer (void *stream, size_t size, size_t nmemb, void *ptr)
92 wrt = size * nmemb;
102 putBuffer_fail (void *stream, size_t size, size_t nmemb, void *ptr)
109 copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx)
113 if (cbc->pos + size * nmemb > cbc->size)
115 memcpy (&cbc->buf[cbc->pos], ptr, size * nmemb);
116 cbc->pos += size * nmemb;
117 return size * nmemb;
  /external/clang/test/Analysis/
malloc-sizeof.cpp 6 void *calloc(size_t nmemb, size_t size);
  /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);

Completed in 1386 milliseconds

1 2 3 4 5 6 7 8 91011>>