Searched refs:size (Results 1 - 25 of 183) sorted by relevance

12345678

/system/core/libcutils/arch-mips/
H A Dandroid_memset.c20 void _memset16(uint16_t* dst, uint16_t value, size_t size);
21 void _memset32(uint32_t* dst, uint32_t value, size_t size);
23 void android_memset16(uint16_t* dst, uint16_t value, size_t size) argument
25 _memset16(dst, value, size);
28 void android_memset32(uint32_t* dst, uint32_t value, size_t size) argument
30 _memset32(dst, value, size);
/system/core/libcutils/
H A Dmemory.c20 void android_memset16(uint16_t* dst, uint16_t value, size_t size) argument
22 size >>= 1;
23 while (size--) {
30 void android_memset32(uint32_t* dst, uint32_t value, size_t size) argument
32 size >>= 2;
33 while (size--) {
62 * Copy src to string dst of size siz. At most siz-1 characters
/system/core/libsparse/
H A Dsparse_crc32.h19 uint32_t sparse_crc32(uint32_t crc, const void *buf, size_t size);
/system/core/include/cutils/
H A Dpartition_utils.h23 void erase_footer(const char *dev_path, long long size);
H A Dmemory.h27 /* size is given in bytes and must be multiple of 2 */
28 void android_memset16(uint16_t* dst, uint16_t value, size_t size);
30 /* size is given in bytes and must be multiple of 4 */
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/core/libutils/
H A DJenkinsHash.cpp18 * optimized for code size and portability, rather than raw speed. But speed
33 uint32_t JenkinsHashMixBytes(uint32_t hash, const uint8_t* bytes, size_t size) { argument
34 hash = JenkinsHashMix(hash, (uint32_t)size);
36 for (i = 0; i < (size & -4); i += 4) {
40 if (size & 3) {
42 data |= ((size & 3) > 1) ? (bytes[i+1] << 8) : 0;
43 data |= ((size & 3) > 2) ? (bytes[i+2] << 16) : 0;
49 uint32_t JenkinsHashMixShorts(uint32_t hash, const uint16_t* shorts, size_t size) { argument
50 hash = JenkinsHashMix(hash, (uint32_t)size);
52 for (i = 0; i < (size
[all...]
H A DLinearAllocator.cpp34 // The ideal size of a page allocation (these need to be multiples of 8)
55 #define ADD_ALLOCATION(size)
56 #define RM_ALLOCATION(size)
72 static void _addAllocation(size_t size) { argument
74 s_totalAllocations += size;
78 #define ADD_ALLOCATION(size) _addAllocation(size);
79 #define RM_ALLOCATION(size) _addAllocation(-size);
95 void* operator new(size_t size, voi argument
140 fitsInCurrentPage(size_t size) argument
144 ensureNext(size_t size) argument
163 alloc(size_t size) argument
[all...]
/system/core/libutils/tests/
H A DVector_test.cpp48 EXPECT_EQ(vector.size(), 3);
53 EXPECT_EQ(other.size(), 3);
59 EXPECT_EQ(vector.size(), 4);
60 EXPECT_EQ(other.size(), 3);
66 EXPECT_EQ(vector.size(), 4);
67 EXPECT_EQ(other.size(), 4);
/system/extras/tests/memtest/
H A Dmemtest.cpp42 " copy_bandwidth [--size BYTES_TO_COPY]\n"
43 " write_bandwidth [--size BYTES_TO_WRITE]\n"
44 " read_bandwidth [--size BYTES_TO_COPY]\n"
45 " per_core_bandwidth [--size BYTES]\n"
50 " multithread_bandwidth [--size BYTES]\n"
119 size_t size = 0x40000000; local
120 while (size) {
121 void* addr = malloc(size);
123 printf("size = %9zd failed\n", size);
144 size_t size = i==0 ? 4096 : 48*1024*1024; // 48 MB local
[all...]
/system/extras/tests/sdcard/
H A Dsysutil.cpp74 // @param size The size of the buffer pointed by str. Must be >= 1.
77 int readStringFromFile(const char *filename, char *const start, size_t size, bool must_exist=true) argument
79 if (NULL == start || size == 0)
99 --size; // reserve space for trailing '\0'
101 while (size > 0 && !error && !eof && attempts < kMaxAttempts)
105 s = read(fd, end, size);
122 size -= s;
161 size_t size = len; local
165 while (size >
235 kernelVersion(char *str, size_t size) argument
285 schedFeatures(char *str, size_t size) argument
447 size_t size = sizeof(pid); local
525 size_t size; local
[all...]
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...]
H A Dstopwatch.h71 // size_t size = sizeof(buffer);
72 // watch.sprint(&str, &size);
89 // to size the internal storage, when the capacity
111 // @param size[inout] On entry points to the size of the buffer
112 // pointed by *str. On exit *size is the amount of free space left
115 void sprint(char **str, size_t *size);
127 void printAverageMinMax(char **str, size_t *size);
128 void printThroughput(char **str, size_t *size);
/system/core/toolbox/
H A Dinsmod.c17 ssize_t size; local
28 size = sb.st_size;
31 buffer = malloc(size);
36 ret = read(fd, buffer, size);
37 if (ret != size)
41 *_size = size;
52 ssize_t size = 0; local
63 file = read_file(argv[1], &size);
85 ret = init_module(file, size, opts);
/system/core/include/sysutils/
H A DNetlinkEvent.h43 bool decode(char *buffer, int size, int format = NetlinkListener::NETLINK_FORMAT_ASCII);
53 bool parseBinaryNetlinkMessage(char *buffer, int size);
54 bool parseAsciiNetlinkMessage(char *buffer, int size);
/system/core/include/utils/
H A DJenkinsHash.h18 * optimized for code size and portability, rather than raw speed. But speed
42 uint32_t JenkinsHashMixBytes(uint32_t hash, const uint8_t* bytes, size_t size);
44 uint32_t JenkinsHashMixShorts(uint32_t hash, const uint16_t* shorts, size_t size);
H A DFlattenable.h32 static size_t align(size_t size) { argument
34 return (size + (N-1)) & ~(N-1);
50 static void advance(void*& buffer, size_t& size, size_t offset) { argument
52 size -= offset;
55 static void advance(void const*& buffer, size_t& size, size_t offset) { argument
57 size -= offset;
62 static void write(void*& buffer, size_t& size, const T& value) { argument
64 advance(buffer, size, sizeof(T));
69 static void read(void const*& buffer, size_t& size, T& value) { argument
71 advance(buffer, size, sizeo
117 flatten( void*& buffer, size_t& size, int*& fds, size_t& count) const argument
122 unflatten( void const*& buffer, size_t& size, int const*& fds, size_t& count) argument
163 unflatten(void const* buffer, size_t size) argument
[all...]
H A DSharedBuffer.h36 /*! allocate a buffer of size 'size' and acquire() it.
39 static SharedBuffer* alloc(size_t size);
54 //! get size of the buffer
55 inline size_t size() const;
63 //! get the size of a SharedBuffer object from its data
70 SharedBuffer* editResize(size_t size) const;
76 SharedBuffer* reset(size_t size) const;
113 size_t SharedBuffer::size() const { function in class:android::SharedBuffer
H A DLinearAllocator.h45 * Reserves and returns a region of memory of at least size 'size', aligning as needed.
52 void* alloc(size_t size);
77 bool fitsInCurrentPage(size_t size);
78 void ensureNext(size_t size);
/system/core/libzipfile/
H A Dtest_zipfile.c12 size_t size, unsize; local
41 size = ftell(f);
44 buf = malloc(size);
45 fread(buf, 1, size, f);
47 zip = init_zipfile(buf, size);
76 size = unsize * 1.001;
77 scratch = malloc(size);
79 err = decompress_zipentry(entry, scratch, size);
/system/core/sh/
H A Dmystring.c75 * truncation is performed. "Size" is the size of "to".
79 scopyn(const char *from, char *to, int size) argument
82 while (--size > 0) {
/system/netd/
H A DNetdConstants.cpp76 const char* argv[argsList.size()];
85 res |= execIptablesCommand(argsList.size(), argv, silent);
89 res |= execIptablesCommand(argsList.size(), argv, silent);
110 int writeFile(const char *path, const char *value, int size) { argument
117 if (write(fd, value, size) != size) {
129 int size; local
136 size = read(fd, buf, *sizep);
137 if (size < 0) {
142 *sizep = size;
[all...]
/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...]
/system/core/libpixelflinger/codeflinger/tinyutils/
H A DSharedBuffer.h37 /*! allocate a buffer of size 'size' and acquire() it.
40 static SharedBuffer* alloc(size_t size);
58 //! get size of the buffer
59 inline size_t size() const;
67 //! get the size of a SharedBuffer object from its data
74 SharedBuffer* editResize(size_t size) const;
80 SharedBuffer* reset(size_t size) const;
120 size_t SharedBuffer::size() const { function in class:android::tinyutils::SharedBuffer
/system/core/libpixelflinger/codeflinger/
H A DCodeCache.cpp103 Assembly::Assembly(size_t size)
106 mBase = (uint32_t*)mspace_malloc(getMspace(), size);
108 "Failed to create Assembly of size %zd in executable "
109 "store of size %zd", size, kMaxCodeCacheCapacity);
110 mSize = size;
130 ssize_t Assembly::size() const
146 "of size %zd", newSize, kMaxCodeCacheCapacity);
148 return size();
153 CodeCache::CodeCache(size_t size)
[all...]
/system/extras/fatblock/
H A Dfat.c37 cluster_t first_cluster, uint32_t size)
47 de->size = htole32(size);
35 fat_dirent_set(struct fat_dirent *de, char *name, uint8_t attr, cluster_t first_cluster, uint32_t size) argument

Completed in 263 milliseconds

12345678