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

1234567891011>>

/system/core/libcutils/arch-mips/
H A Dandroid_memset.c33 void android_memset16(uint16_t* dst, uint16_t value, size_t size) argument
36 size >>= 1;
37 while (size--)
41 size >>= 1;
42 if (((uintptr_t)dst & 2) && size) {
45 size--;
50 android_memset32((uint32_t*) dst, value32, size<<1);
51 if (size & 1) {
52 dst[size-1] = value; /* fill unpaired last elem */
57 void android_memset32(uint32_t* dst, uint32_t value, size_t size) argument
[all...]
/system/bt/hci/src/
H A Dbuffer_allocator.c25 static void *buffer_alloc(size_t size) { argument
26 assert(size <= GKI_MAX_BUF_SIZE);
27 return GKI_getbuf((uint16_t)size);
/system/bt/bta/include/
H A Dbta_jv_co.h46 extern int bta_co_rfc_data_outgoing_size(void *user_data, int *size);
47 extern int bta_co_rfc_data_outgoing(void *user_data, UINT8* buf, UINT16 size);
50 extern int bta_co_l2cap_data_outgoing_size(void *user_data, int *size);
51 extern int bta_co_l2cap_data_outgoing(void *user_data, UINT8* buf, UINT16 size);
/system/bt/osi/src/
H A Dallocator.c28 size_t size = strlen(str) + 1; // + 1 for the null terminator local
29 size_t real_size = allocation_tracker_resize_for_canary(size);
34 size);
38 memcpy(new_string, str, size);
42 void *osi_malloc(size_t size) { argument
43 size_t real_size = allocation_tracker_resize_for_canary(size);
47 size);
50 void *osi_calloc(size_t size) { argument
51 size_t real_size = allocation_tracker_resize_for_canary(size);
55 size);
[all...]
/system/extras/tests/pagingtest/
H A Dpagingtest.h7 #define mincore_vec_len(size) (((size) + sysconf(_SC_PAGE_SIZE) - 1) / sysconf(_SC_PAGE_SIZE))
11 int create_tmp_file(char *filename, off_t size);
12 unsigned char *alloc_mincore_vec(size_t size);
13 bool check_caching(void *buf, unsigned char *vec, size_t size, bool is_cached);
H A Dpagingtest.c17 int create_tmp_file(char *filename, off_t size) { argument
40 if (ftruncate(fd, size)) {
45 buf = mmap(NULL, size, PROT_WRITE, MAP_SHARED, fd, 0);
51 rc = read(urandom, buf, size);
58 if (rc != size) {
63 if (madvise(buf, size, MADV_DONTNEED)) {
73 rc = posix_fadvise(fd, 0, size, POSIX_FADV_DONTNEED);
79 munmap(buf, size);
84 munmap(buf, size);
95 unsigned char *alloc_mincore_vec(size_t size) { argument
106 check_caching(void *buf, unsigned char *vec, size_t size, bool is_cached) argument
[all...]
/system/core/libsparse/
H A Dsparse_crc32.h19 uint32_t sparse_crc32(uint32_t crc, const void *buf, size_t size);
/system/extras/perfprofd/quipper/kernel-headers/tools/perf/util/include/linux/
H A Dbitops.h33 #define for_each_set_bit(bit,addr,size) for((bit) = find_first_bit((addr), (size)); (bit) < (size); (bit) = find_next_bit((addr), (size), (bit) + 1))
34 #define for_each_set_bit_from(bit,addr,size) for((bit) = find_next_bit((addr), (size), (bit)); (bit) < (size); (bit) = find_next_bit((addr), (size), (bit) + 1))
/system/bt/osi/include/
H A Dallocator.h24 typedef void *(*alloc_fn)(size_t size);
38 void *osi_malloc(size_t size);
39 void *osi_calloc(size_t size);
/system/core/include/cutils/
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...]
/system/extras/perfprofd/quipper/original-kernel-headers/tools/perf/util/include/linux/
H A Dbitops.h19 #define for_each_set_bit(bit, addr, size) \
20 for ((bit) = find_first_bit((addr), (size)); \
21 (bit) < (size); \
22 (bit) = find_next_bit((addr), (size), (bit) + 1))
25 #define for_each_set_bit_from(bit, addr, size) \
26 for ((bit) = find_next_bit((addr), (size), (bit)); \
27 (bit) < (size); \
28 (bit) = find_next_bit((addr), (size), (bit) + 1))
94 find_first_bit(const unsigned long *addr, unsigned long size) argument
100 while (size
120 find_next_bit(const unsigned long *addr, unsigned long size, unsigned long offset) argument
[all...]
/system/core/libion/tests/
H A Dmap_test.cpp32 for (size_t size : allocationSizes) {
34 SCOPED_TRACE(::testing::Message() << "size " << size);
37 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, 0, &handle));
42 ASSERT_EQ(0, ion_map(m_ionFd, handle, size, PROT_READ | PROT_WRITE, MAP_SHARED, 0, &ptr, &map_fd));
50 memset(ptr, 0xaa, size);
52 ASSERT_EQ(0, munmap(ptr, size));
61 for (size_t size : allocationSizes) {
63 SCOPED_TRACE(::testing::Message() << "size " << size);
[all...]
H A Dexit_test.cpp32 for (size_t size : allocationSizes) {
34 SCOPED_TRACE(::testing::Message() << "size " << size);
38 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, 0, &handle));
50 for (size_t size : allocationSizes) {
52 SCOPED_TRACE(::testing::Message() << "size " << size);
56 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, size, 0, heapMask, 0, &handle_fd));
68 for (size_t size : allocationSizes) {
71 SCOPED_TRACE(::testing::Message() << "size " << siz
[all...]
/system/extras/perfprofd/quipper/
H A Daddress_mapper.h39 // e.g. Given a mapped region with base=0x4000 and size=0x2000 mapped with
64 return mappings_.size();
80 uint64_t size; member in struct:quipper::AddressMapper::MappedRange
90 return (real_addr <= range.real_addr + range.size - 1) &&
91 (real_addr + size - 1 >= range.real_addr);
97 (real_addr + size - 1 >= range.real_addr + range.size - 1);
104 (real_addr + size - 1 > range.real_addr + range.size - 1);
109 return (addr >= real_addr && addr <= real_addr + size
[all...]
H A Daddress_mapper.cc16 const uint64_t size,
18 return MapWithID(real_addr, size, kuint64max, 0, remove_existing_mappings);
22 const uint64_t size,
28 range.size = size;
32 if (size == 0) {
38 if (real_addr + size - 1 != kuint64max &&
39 !(real_addr + size > real_addr)) {
42 << " with size " << std::hex << size << " overflow local
15 Map(const uint64_t real_addr, const uint64_t size, const bool remove_existing_mappings) argument
21 MapWithID(const uint64_t real_addr, const uint64_t size, const uint64_t id, const uint64_t offset_base, bool remove_existing_mappings) argument
139 << " with size " << std::hex << size; local
[all...]
/system/keymaster/
H A Dandroid_keymaster_utils.cpp27 uint8_t* dup_buffer(const void* buf, size_t size) { argument
28 if (size >= kMaxDupBufferSize)
30 uint8_t* retval = new (std::nothrow) uint8_t[size];
32 memcpy(retval, buf, size);
H A Dserializable.cpp38 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size) { argument
39 if (*buf_ptr + size < *buf_ptr) // Pointer wrap check
42 if (end < *buf_ptr + size)
44 memcpy(dest, *buf_ptr, size);
45 *buf_ptr += size;
49 bool copy_size_and_data_from_buf(const uint8_t** buf_ptr, const uint8_t* end, size_t* size, argument
51 if (!copy_uint32_from_buf(buf_ptr, end, size))
54 if (*buf_ptr + *size < *buf_ptr) // Pointer wrap check
57 if (*buf_ptr + *size > end)
60 if (*size
70 reserve(size_t size) argument
86 Reinitialize(size_t size) argument
[all...]
H A Dhkdf_test.cpp77 Rfc5869HmacSha256Kdf hkdf(reinterpret_cast<const uint8_t*>(key.data()), key.size(),
78 reinterpret_cast<const uint8_t*>(salt.data()), salt.size(),
79 reinterpret_cast<const uint8_t*>(info.data()), info.size(),
80 expected.size(), &error);
85 ASSERT_EQ(expected.size(), secret_key.available_read());
86 EXPECT_EQ(0, memcmp(expected.data(), secret_key.peek_read(), expected.size()));
/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...]
/system/extras/simpleperf/
H A Dcommand_test.cpp41 size_t command_count = Command::GetAllCommands().size();
44 ASSERT_EQ(command_count + 1, Command::GetAllCommands().size());
46 ASSERT_EQ(command_count, Command::GetAllCommands().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...]
/system/core/libutils/tests/
H A DVector_test.cpp50 EXPECT_EQ(vector.size(), 3);
55 EXPECT_EQ(other.size(), 3);
61 EXPECT_EQ(vector.size(), 4);
62 EXPECT_EQ(other.size(), 3);
68 EXPECT_EQ(vector.size(), 4);
69 EXPECT_EQ(other.size(), 4);
106 // Checks that the size calculation (not the capacity calculation) doesn't
107 // overflow : the size here will be (1 + SIZE_MAX).
117 // the size of the vector doesn't.
146 ASSERT_EQ(vector1.size(), vector
[all...]

Completed in 619 milliseconds

1234567891011>>