Searched defs:size (Results 26 - 50 of 93) sorted by relevance

1234

/system/core/libcutils/
H A Dopen_memstream.c71 size_t allocSize; /* size of buffer */
80 * Ensure that we have enough storage to write "size" bytes at the
88 DBUG(("+++ ensureCap off=%d size=%d\n", stream->offset, writeSize));
105 DBUG(("+++ realloc %p->%p to size=%d\n",
123 static int write_memstream(void* cookie, const char* buf, int size) argument
127 if (ensureCapacity(stream, size) < 0)
139 memcpy(*stream->bufp + stream->offset, buf, size);
140 stream->offset += size;
156 return size;
H A Dselector.c154 int size = arraySize(selectableFds); local
155 while (i < size) {
160 size--;
216 int size = arraySize(selectableFds); local
218 for (i = 0; i < size; i++) {
H A Dhashmap.c40 size_t size; member in struct:Hashmap
67 map->size = 0;
94 return map->size;
103 if (map->size > (map->bucketCount * 3 / 4)) {
204 map->size++;
269 map->size++;
296 map->size--;
/system/core/libpixelflinger/
H A Dclear.cpp53 const uint32_t size = c->formats[s.format].size; local
54 const int32_t stride = s.stride * size;
55 uint8_t* dst = (uint8_t*)s.data + (l + t*s.stride)*size;
56 w *= size;
64 switch (size) {
/system/core/toolbox/grep/
H A Dfastgrep.c283 size_t size; local
288 if ((size = mbstowcs(NULL, (const char *)data, 0)) ==
292 wdata = grep_malloc(size * sizeof(wint_t));
294 if (mbstowcs(wdata, (const char *)data, size) ==
298 if ((size = mbstowcs(NULL, (const char *)pat, 0)) ==
302 wpat = grep_malloc(size * sizeof(wint_t));
304 if (mbstowcs(wpat, (const char *)pat, size) == ((size_t) - 1))
H A Dutil.c392 grep_malloc(size_t size) argument
396 if ((ptr = malloc(size)) == NULL)
405 grep_calloc(size_t nmemb, size_t size) argument
409 if ((ptr = calloc(nmemb, size)) == NULL)
418 grep_realloc(void *ptr, size_t size) argument
421 if ((ptr = realloc(ptr, size)) == NULL)
/system/extras/fatblock/
H A Dfatblock.h47 uint32_t size; member in struct:file
60 uint32_t size; member in struct:dir
/system/extras/tests/sdcard/
H A Dstopwatch.cpp36 #define SNPRINTF_OR_RETURN(str, size, format, ...) { \
37 int len = snprintf((str), (size), (format), ## __VA_ARGS__); \
39 if (len > static_cast<int>(size)) { \
43 (size) -= len; (str) += len; \
106 void StopWatch::sprint(char **str, size_t *size) argument
118 if (kVerbose) SNPRINTF_OR_RETURN(*str, *size, "# Got %d samples for %s\n", mDataLen, mName);
121 SNPRINTF_OR_RETURN(*str, *size, "# StopWatch %s total/cumulative duration %f Samples: %d\n",
123 printThroughput(str, size);
124 printAverageMinMax(str, size);
130 SNPRINTF_OR_RETURN(*str, *size, "# Nam
217 printAverageMinMax(char **str, size_t *size) argument
228 printThroughput(char **str, size_t *size) argument
[all...]
/system/vold/
H A DFat.cpp170 const char *size = tmp; local
172 args[8] = size;
H A Dcryptfs.h62 unsigned int size; member in struct:volume_info
/system/core/adb/
H A Dfile_sync_service.h58 unsigned size; member in struct:__anon274::__anon276
64 unsigned size; member in struct:__anon274::__anon277
70 unsigned size; member in struct:__anon274::__anon278
/system/core/fastboot/
H A Dprotocol.c50 static int check_response(usb_handle *usb, unsigned int size, char *response) argument
91 if(!memcmp(status, "DATA", 4) && size > 0){
93 if(dsize > size) {
94 strcpy(ERROR, "data size too large");
109 static int _command_start(usb_handle *usb, const char *cmd, unsigned size, argument
130 return check_response(usb, size, response);
133 static int _command_data(usb_handle *usb, const void *data, unsigned size) argument
137 r = usb_write(usb, data, size);
143 if(r != ((int) size)) {
163 const void *data, unsigned size,
162 _command_send(usb_handle *usb, const char *cmd, const void *data, unsigned size, char *response) argument
207 fb_download_data(usb_handle *usb, const void *data, unsigned size) argument
295 int size = sparse_file_len(s, true, false); local
[all...]
H A Dusb_linux.c65 /* The max bulk size for linux is 16384 which is defined
86 static int check(void *_desc, int len, unsigned type, int size) argument
90 if(len < size) return -1;
91 if(desc[0] < size) return -1;
/system/core/libctest/
H A Dctest.c34 int size; member in struct:__anon387
60 assert(testSuite->size <= MAX_TESTS);
62 int index = testSuite->size;
66 testSuite->size++;
74 failures, suite->size);
117 for (suite->currentTest = 0; suite->currentTest < suite->size;
146 printf("SUCCESS! %d tests ran successfully.\n", suite->size);
/system/core/libnetutils/
H A Dpacket.c89 int send_packet(int s, int if_index, struct dhcp_msg *msg, int size, argument
103 ip.tot_len = htons(sizeof(ip) + sizeof(udp) + size);
115 udp.len = htons(sizeof(udp) + size);
130 udpsum = checksum(msg, size, udpsum);
138 iov[2].iov_len = size;
/system/core/libpixelflinger/tinyutils/
H A DKeyedVector.h44 inline size_t size() const { return mVector.size(); } function in class:android::KeyedVector
49 //! setst the capacity. capacity can never be reduced less than size()
50 inline ssize_t setCapacity(size_t size) { return mVector.setCapacity(size); } argument
158 if (index<size()) {
H A DVector.h61 inline size_t size() const { return VectorImpl::size(); } function in class:android::Vector
66 //! setst the capacity. capacity can never be reduced less than size()
67 inline ssize_t setCapacity(size_t size) { return VectorImpl::setCapacity(size); } argument
213 LOG_FATAL_IF( index>=size(),
214 "itemAt: index %d is past size %d", (int)index, (int)size() );
225 LOG_FATAL_IF( (index>0 ? index : -index)>=size(),
226 "mirrorItemAt: index %d is past size
[all...]
/system/core/libzipfile/
H A Dzipfile.c10 init_zipfile(const void* data, size_t size) argument
18 file->bufsize = size;
/system/core/toolbox/
H A Dnandread.c12 static int test_empty(const char *buf, size_t size) argument
14 while(size--) {
79 " -s <size> Number of spare bytes in file (default 64)\n"
132 printf("size: %u\n", mtdinfo.size);
133 printf("erase size: %u\n", mtdinfo.erasesize);
134 printf("write size: %u\n", mtdinfo.writesize);
135 printf("oob size: %u\n", mtdinfo.oobsize);
140 fprintf(stderr, "failed allocate readbuffer size %u\n",
161 printf("oobavail, %d > image spare size,
[all...]
H A Dschedtop.c51 size_t size = table->allocated; local
53 if (size < 128)
54 size = 128;
56 size *= 2;
58 new_table = realloc(table->data, size * sizeof(*table->data));
64 table->allocated = size;
/system/core/cpio/
H A Dmkbootfs.c167 int size = 32; local
169 char** names = malloc(size * sizeof(char*));
171 fprintf(stderr, "failed to allocate dir names array (size %d)\n", size);
182 if (entries >= size) {
183 size *= 2;
184 names = realloc(names, size * sizeof(char*));
186 fprintf(stderr, "failed to reallocate dir names array (size %d)\n",
187 size);
258 int size; local
[all...]
/system/core/libsparse/
H A Dsparse_read.c57 int size; local
60 size = vsnprintf(NULL, 0, fmt, argp);
63 if (size < 0) {
67 at = malloc(size + 1);
73 vsnprintf(at, size, fmt, argp);
75 at[size] = 0;
/system/core/libsysutils/src/
H A DNetlinkEvent.cpp75 bool NetlinkEvent::parseBinaryNetlinkMessage(char *buffer, int size) { argument
76 size_t sz = size;
133 nh = NLMSG_NEXT(nh, size);
163 bool NetlinkEvent::parseAsciiNetlinkMessage(char *buffer, int size) { argument
170 if (size == 0)
174 buffer[size-1] = '\0';
176 end = s + size;
210 bool NetlinkEvent::decode(char *buffer, int size, int format) { argument
212 return parseBinaryNetlinkMessage(buffer, size);
214 return parseAsciiNetlinkMessage(buffer, size);
[all...]
/system/core/run-as/
H A Dpackage.c47 /* Copy 'srclen' string bytes from 'src' into buffer 'dst' of size 'dstlen'
70 * On exit, *filesize will be set to the file's size, or 0 on error
87 /* get its size */
102 /* Ensure that the size is not ridiculously large */
116 /* We're good, return size */
130 unmap_file(void* address, size_t size) argument
133 TEMP_FAILURE_RETRY(munmap(address, size));
/system/core/toolbox/cp/
H A Dutils.c98 size_t size; member in struct:finfo
104 int pcent = (int)((100.0 * written) / fi->size);
108 fi->from, fi->to, written, fi->size, pcent);
206 fi.size = (size_t)fs->st_size;

Completed in 635 milliseconds

1234