Home
last modified time | relevance | path

Searched refs:size (Results 1 – 25 of 119) sorted by relevance

12345

/system/extras/tests/memtest/
Dmemtest.cpp129 int validate_memcpy(char* s, char* d, size_t size);
130 int validate_memset(char* s, char c, size_t size);
157 struct result_t { int size; float res; }; in memcpy_test() member
160 int size = 0; in memcpy_test() local
163 if (size<128) size += 8; in memcpy_test()
164 else if (size<1024) size += 128; in memcpy_test()
165 else if (size<16384) size += 1024; in memcpy_test()
166 else size <<= 1; in memcpy_test()
170 size = FAST_SIZES[i]; in memcpy_test()
172 if (size > MAX_SIZE) { in memcpy_test()
[all …]
/system/extras/tests/sdcard/
Dsysutil.cpp77 int readStringFromFile(const char *filename, char *const start, size_t size, bool must_exist=true) in readStringFromFile() argument
79 if (NULL == start || size == 0) in readStringFromFile()
99 --size; // reserve space for trailing '\0' in readStringFromFile()
101 while (size > 0 && !error && !eof && attempts < kMaxAttempts) in readStringFromFile()
105 s = read(fd, end, size); in readStringFromFile()
122 size -= s; in readStringFromFile()
161 size_t size = len; in writeStringToFile() local
165 while (size > 0 && !error && attempts < kMaxAttempts) in writeStringToFile()
167 ssize_t s = write(fd, start, size); in writeStringToFile()
180 size -= s; in writeStringToFile()
[all …]
Dstopwatch.cpp35 #define SNPRINTF_OR_RETURN(str, size, format, ...) { \ argument
36 int len = snprintf((str), (size), (format), ## __VA_ARGS__); \
38 if (len > static_cast<int>(size)) { \
42 (size) -= len; (str) += len; \
105 void StopWatch::sprint(char **str, size_t *size) in sprint() argument
117 if (kVerbose) SNPRINTF_OR_RETURN(*str, *size, "# Got %d samples for %s\n", mDataLen, mName); in sprint()
120 SNPRINTF_OR_RETURN(*str, *size, "# StopWatch %s total/cumulative duration %f Samples: %d\n", in sprint()
122 printThroughput(str, size); in sprint()
123 printAverageMinMax(str, size); in sprint()
129 … SNPRINTF_OR_RETURN(*str, *size, "# Name Iterations Duration Min MinIdx Max MaxIdx SizeMbytes\n"); in sprint()
[all …]
/system/wlan/ti/sta_dk_4_0_4_32/CUDK/IPC/Linux/
Dipc_user.c114 tiUINT32 size; in IPC_DeviceIoControl() local
124 size = max( max(sizeIn, sizeOut ), 8 ); /* always pass as pointer to buffer*/ in IPC_DeviceIoControl()
125 if( size >= 0xFFFF ) in IPC_DeviceIoControl()
131 buf = setget_buf = malloc(size); in IPC_DeviceIoControl()
145 size = sizeOut; in IPC_DeviceIoControl()
151 size= sizeIn; in IPC_DeviceIoControl()
161 buf, (buf) ? * (tiINT32 *)buf : 0, size, sizeRet, sizeRet ? *sizeRet : -1); in IPC_DeviceIoControl()
165 ti_req->length = size; in IPC_DeviceIoControl()
169 if( size > max_size ) in IPC_DeviceIoControl()
178 memmove( ((tiCHAR *) &ti_req->user_data_pointer), buf, size ); in IPC_DeviceIoControl()
[all …]
/system/core/libcutils/
Dbuffer.c47 Buffer* bufferWrap(char* data, size_t capacity, size_t size) { in bufferWrap() argument
55 buffer->size = size; in bufferWrap()
72 buffer->size = 0; in bufferPrepareForRead()
78 assert(buffer->size < buffer->expected); in bufferRead()
81 buffer->data + buffer->size, in bufferRead()
82 buffer->expected - buffer->size); in bufferRead()
85 buffer->size += bytesRead; in bufferRead()
86 return buffer->size; in bufferRead()
93 buffer->remaining = buffer->size; in bufferPrepareForWrite()
98 assert(buffer->remaining <= buffer->size); in bufferWrite()
[all …]
Darray.c28 int size; member
94 int size = array->size; in arrayAdd() local
95 int result = ensureCapacity(array, size + 1); in arrayAdd()
99 array->contents[size] = pointer; in arrayAdd()
100 array->size++; in arrayAdd()
106 assert(index < array->size); in checkBounds()
120 int newSize = array->size - 1; in arrayRemove()
128 array->size = newSize; in arrayRemove()
144 int oldSize = array->size; in arraySetSize()
158 array->size = newSize; in arraySetSize()
[all …]
Dmemory.c19 void android_memset16(uint16_t* dst, uint16_t value, size_t size) in android_memset16() argument
21 size >>= 1; in android_memset16()
22 while (size--) { in android_memset16()
27 void android_memset32(uint32_t* dst, uint32_t value, size_t size) in android_memset32() argument
29 size >>= 2; in android_memset32()
30 while (size--) { in android_memset32()
/system/core/fastboot/
Dprotocol.c43 static int check_response(usb_handle *usb, unsigned size, in check_response() argument
87 if(dsize > size) { in check_response()
104 const void *data, unsigned size, in _command_send() argument
126 return check_response(usb, size, 0, response); in _command_send()
129 r = check_response(usb, size, 1, 0); in _command_send()
133 size = r; in _command_send()
135 if(size) { in _command_send()
136 r = usb_write(usb, data, size); in _command_send()
142 if(r != ((int) size)) { in _command_send()
153 return size; in _command_send()
[all …]
/system/core/toolbox/
Dinsmod.c17 ssize_t size; in read_file() local
28 size = sb.st_size; in read_file()
31 buffer = malloc(size); in read_file()
36 ret = read(fd, buffer, size); in read_file()
37 if (ret != size) in read_file()
41 *_size = size; in read_file()
52 ssize_t size = 0; in insmod_main() local
63 file = read_file(argv[1], &size); in insmod_main()
86 ret = init_module(file, size, opts); in insmod_main()
/system/core/libpixelflinger/codeflinger/
DCodeCache.cpp39 Assembly::Assembly(size_t size) in Assembly() argument
42 mBase = (uint32_t*)malloc(size); in Assembly()
44 mSize = size; in Assembly()
65 ssize_t Assembly::size() const in size() function in android::Assembly
80 return size(); in resize()
85 CodeCache::CodeCache(size_t size) in CodeCache() argument
86 : mCacheSize(size), mCacheInUse(0) in CodeCache()
115 const ssize_t assemblySize = assembly->size(); in cache()
119 size_t count = mCacheData.size(); in cache()
127 mCacheInUse -= e.entry->size(); in cache()
[all …]
/system/core/libzipfile/
Dtest_zipfile.c12 size_t size, unsize; in main() local
41 size = ftell(f); in main()
44 buf = malloc(size); in main()
45 fread(buf, 1, size, f); in main()
47 zip = init_zipfile(buf, size); in main()
74 size = unsize * 1.001; in main()
75 scratch = malloc(size); in main()
77 err = decompress_zipentry(entry, scratch, size); in main()
/system/wlan/ti/sta_dk_4_0_4_32/common/src/core/sme/siteMgr/
Dtemplates.c81 UINT32 size; in buildNullTemplate() local
107 size = sizeof(dot11_mgmtHeader_t); in buildNullTemplate()
109 pTemplate->templateLen = size; in buildNullTemplate()
138 UINT32 size; in buildProbeReqTemplate() local
167 size = sizeof(dot11_mgmtHeader_t); in buildProbeReqTemplate()
177 size += sizeof(dot11_eleHdr_t) + pSsid->len; in buildProbeReqTemplate()
227 size += pDot11Rates->hdr.eleLen + sizeof(dot11_eleHdr_t); in buildProbeReqTemplate()
241 size += suppRatesLen + extSuppRatesLen; in buildProbeReqTemplate()
245 pTemplate->templateLen = size; in buildProbeReqTemplate()
279 UINT32 size; in buildProbeRspTemplate() local
[all …]
/system/core/nexus/
DController.cpp72 unsigned int size; in loadKernelModule() local
74 module = loadFile(modpath, &size); in loadKernelModule()
80 int rc = init_module(module, size, args); in loadKernelModule()
134 ssize_t size; in loadFile() local
145 size = sb.st_size; in loadFile()
148 buffer = malloc(size); in loadFile()
153 ret = read(fd, buffer, size); in loadFile()
154 if (ret != size) in loadFile()
158 *_size = size; in loadFile()
/system/core/vold/
Dmisc.c32 ssize_t size; in read_file() local
43 size = sb.st_size; in read_file()
46 buffer = malloc(size); in read_file()
51 ret = read(fd, buffer, size); in read_file()
52 if (ret != size) in read_file()
56 *_size = size; in read_file()
/system/core/libctest/
Dctest.c34 int size; member
60 assert(testSuite->size <= MAX_TESTS); in addNamedTest()
62 int index = testSuite->size; in addNamedTest()
66 testSuite->size++; in addNamedTest()
74 failures, suite->size); in printFailures()
117 for (suite->currentTest = 0; suite->currentTest < suite->size; in runTests()
146 printf("SUCCESS! %d tests ran successfully.\n", suite->size); in runTests()
/system/core/adb/
Dfile_sync_client.c75 typedef void (*sync_ls_cb)(unsigned mode, unsigned size, unsigned time, const char *name, void *coo…
106 ltohl(msg.dent.size), in sync_ls()
120 unsigned size; member
168 unsigned int *mode, unsigned int *size) in sync_finish_readtime() argument
180 *size = ltohl(msg.stat.size); in sync_finish_readtime()
235 sbuf->size = htoll(ret); in write_data_file()
247 static int write_data_buffer(int fd, char* file_buffer, int size, syncsendbuf *sbuf) in write_data_buffer() argument
253 while (total < size) { in write_data_buffer()
254 int count = size - total; in write_data_buffer()
260 sbuf->size = htoll(count); in write_data_buffer()
[all …]
/system/core/cpio/
Dmkbootfs.c127 int size = 32; in _archive_dir() local
129 char** names = malloc(size * sizeof(char*)); in _archive_dir()
131 fprintf(stderr, "failed to allocate dir names array (size %d)\n", size); in _archive_dir()
142 if (entries >= size) { in _archive_dir()
143 size *= 2; in _archive_dir()
144 names = realloc(names, size * sizeof(char*)); in _archive_dir()
147 size); in _archive_dir()
218 int size; in _archive() local
219 size = readlink(in, buf, 1024); in _archive()
220 if(size < 0) die("cannot read symlink '%s'", in); in _archive()
[all …]
/system/core/debuggerd/
Dutility.c36 void get_remote_struct(int pid, void *src, void *dst, size_t size) in get_remote_struct() argument
40 for (i = 0; i+4 <= size; i+=4) { in get_remote_struct()
44 if (i < size) { in get_remote_struct()
47 assert((size - i) < 4); in get_remote_struct()
49 while (i < size) { in get_remote_struct()
/system/core/libpixelflinger/tinyutils/
DSharedBuffer.h31 static SharedBuffer* alloc(size_t size);
50 inline size_t size() const;
65 SharedBuffer* editResize(size_t size) const;
71 SharedBuffer* reset(size_t size) const;
111 size_t SharedBuffer::size() const { in size() function
DVectorImpl.cpp105 return SharedBuffer::sharedBuffer(mStorage)->size() / mItemSize; in capacity()
112 if (index > size()) in insertVectorAt()
114 void* where = _grow(index, vector.size()); in insertVectorAt()
116 _do_copy(where, vector.arrayImpl(), vector.size()); in insertVectorAt()
123 return insertVectorAt(vector, size()); in appendVector()
133 if (index > size()) in insertAt()
148 if (size()) in pop()
149 removeItemsAt(size()-1, 1); in pop()
159 insertAt(item, size()); in push()
169 return insertAt(item, size()); in add()
[all …]
/system/wlan/ti/sta_dk_4_0_4_32/pform/linux/src/
Dtiwlan_profile.c168 void tiwlan_profile_memory_alloc (void * os, unsigned size) in tiwlan_profile_memory_alloc() argument
175 drv->cur_heap_bytes_allocated += size; in tiwlan_profile_memory_alloc()
185 void tiwlan_profile_memory_free (void * os, unsigned size) in tiwlan_profile_memory_free() argument
192 drv->cur_heap_bytes_allocated -= size; in tiwlan_profile_memory_free()
197 __FUNCTION__, size, drv->cur_heap_bytes_allocated); in tiwlan_profile_memory_free()
204 void tiwlan_profile_buf_alloc (void * os, unsigned size) in tiwlan_profile_buf_alloc() argument
210 drv->max_buf_bytes_allocated += size; in tiwlan_profile_buf_alloc()
316 printk ("\nFirmware Image Memory Allocated: %u (bytes)", (unsigned)drv->firmware_image.size); in tiwlan_profile_report()
317 printk ("\nEEPROM Image Memory Allocated: %u (bytes)", (unsigned)drv->eeprom_image.size); in tiwlan_profile_report()
Dosmemapi.c63 __u32 size; member
137 blk->size = Size; in os_memoryAlloc()
192 blk->size = Size; in os_memoryPreAlloc()
279 if (*(__u32 *)((unsigned char *)blk + blk->size + sizeof(struct os_mem_block)) in os_memoryFree()
283 __FUNCTION__, blk->size); in os_memoryFree()
286 os_profile (OsContext, 5, blk->size + sizeof(struct os_mem_block) + sizeof(__u32)); in os_memoryFree()
356 blk->size = Size; in os_memoryAlloc4HwDma()
397 if (*(__u32 *)((unsigned char *)blk + blk->size + sizeof(struct os_mem_block)) in os_memory4HwDmaFree()
401 __FUNCTION__, blk->size); in os_memory4HwDmaFree()
/system/extras/showmap/
Dshowmap.c18 unsigned size; member
67 if(sscanf(line, "Size: %d kB", &mi->size) != 1) goto oops; in read_mapinfo()
115 milist->size += mi->size; in load_maps()
150 unsigned size = 0; in show_map() local
173 size += mi->size; in show_map()
183 printf("%8d %8d %8d %8d %8d %8d %8d %s\n", mi->size, in show_map()
198 printf("%8d %8d %8d %8d %8d %8d %8d TOTAL\n", size, in show_map()
/system/core/include/cutils/
Dmemory.h28 void android_memset16(uint16_t* dst, uint16_t value, size_t size);
31 void android_memset32(uint32_t* dst, uint32_t value, size_t size);
35 size_t strlcpy(char *dst, const char *src, size_t size);
/system/wlan/ti/sta_dk_4_0_4_32/pform/linux/inc/
Ddebug_module.h84 unsigned int size; /* Total size of the buffer */ member
109 void os_cmd_copy_to_user(void *destination, const void *source, unsigned int size);
110 void *os_malloc (UINT32 size);
111 void os_free (void *p, UINT32 size);

12345