Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 45) sorted by relevance

12

/bionic/tests/
Duchar_test.cpp61 char bytes[MB_LEN_MAX]; in TEST() local
62 EXPECT_EQ(1U, c16rtomb(bytes, L'\0', nullptr)); in TEST()
66 char bytes[MB_LEN_MAX]; in TEST() local
68 memset(bytes, 0, sizeof(bytes)); in TEST()
69 EXPECT_EQ(1U, c16rtomb(bytes, L'h', nullptr)); in TEST()
70 EXPECT_EQ('h', bytes[0]); in TEST()
76 memset(bytes, 0, sizeof(bytes)); in TEST()
77 EXPECT_EQ(1U, c16rtomb(bytes, L'h', nullptr)); in TEST()
78 EXPECT_EQ('h', bytes[0]); in TEST()
80 memset(bytes, 0, sizeof(bytes)); in TEST()
[all …]
Dwchar_test.cpp37 char bytes[] = { 'h', 'e', 'l', 'l', 'o', '\0' }; in TEST() local
38 EXPECT_EQ(0U, mbrlen(&bytes[0], 0, nullptr)); in TEST()
39 EXPECT_EQ(1U, mbrlen(&bytes[0], 1, nullptr)); in TEST()
41 EXPECT_EQ(1U, mbrlen(&bytes[4], 1, nullptr)); in TEST()
42 EXPECT_EQ(0U, mbrlen(&bytes[5], 1, nullptr)); in TEST()
52 char bytes[MB_LEN_MAX]; in TEST() local
55 EXPECT_EQ(1, wctomb(bytes, L'\0')); in TEST()
56 EXPECT_EQ(1U, wcrtomb(bytes, L'\0', nullptr)); in TEST()
59 memset(bytes, 0, sizeof(bytes)); in TEST()
60 EXPECT_EQ(1, wctomb(bytes, L'h')); in TEST()
[all …]
Dmalloc_test.cpp1021 EXPECT_EXIT(CheckAllocationFunction([](size_t bytes) { return calloc(bytes, 1) != nullptr; }), in TEST() argument
1023 EXPECT_EXIT(CheckAllocationFunction([](size_t bytes) { return calloc(1, bytes) != nullptr; }), in TEST() argument
1025 EXPECT_EXIT(CheckAllocationFunction([](size_t bytes) { return malloc(bytes) != nullptr; }), in TEST() argument
1028 [](size_t bytes) { return memalign(sizeof(void*), bytes) != nullptr; }), in TEST() argument
1030 EXPECT_EXIT(CheckAllocationFunction([](size_t bytes) { in TEST() argument
1032 return posix_memalign(&ptr, sizeof(void *), bytes) == 0; in TEST()
1036 [](size_t bytes) { return aligned_alloc(sizeof(void*), bytes) != nullptr; }), in TEST() argument
1038 EXPECT_EXIT(CheckAllocationFunction([](size_t bytes) { in TEST() argument
1040 return realloc(p, bytes) != nullptr; in TEST()
1044 EXPECT_EXIT(CheckAllocationFunction([](size_t bytes) { return pvalloc(bytes) != nullptr; }), in TEST() argument
[all …]
/bionic/libc/arch-x86/silvermont/string/
Dsse4-memcmp-slm.S177 jz L(0bytes)
184 jz L(0bytes)
191 jz L(0bytes)
198 jz L(0bytes)
205 jz L(0bytes)
209 je L(0bytes)
222 L(0bytes):
324 L(16bytes):
329 L(12bytes):
334 L(8bytes):
[all …]
/bionic/libc/arch-x86_64/string/
Dsse4-memcmp-slm.S753 jnc L(16bytes)
758 jnc L(16bytes)
763 jnc L(16bytes)
767 jmp L(16bytes)
772 jmp L(16bytes)
776 jmp L(16bytes)
780 jmp L(16bytes)
784 jmp L(16bytes)
788 jmp L(16bytes)
792 jmp L(16bytes)
[all …]
/bionic/libc/bionic/
Dmalloc_limit.cpp49 static void* LimitMalloc(size_t bytes);
50 static void* LimitMemalign(size_t alignment, size_t bytes);
52 static void* LimitRealloc(void* old_mem, size_t bytes);
55 static void* LimitPvalloc(size_t bytes);
56 static void* LimitValloc(size_t bytes);
96 static inline bool CheckLimit(size_t bytes) { in CheckLimit() argument
99 atomic_load_explicit(&gAllocated, memory_order_relaxed), bytes, &total) || in CheckLimit()
137 void* LimitMalloc(size_t bytes) { in LimitMalloc() argument
138 if (!CheckLimit(bytes)) { in LimitMalloc()
139 warning_log("malloc_limit: malloc(%zu) exceeds limit %" PRId64, bytes, gAllocLimit); in LimitMalloc()
[all …]
Dmalloc_common.cpp110 extern "C" void* malloc(size_t bytes) { in malloc() argument
114 result = dispatch_table->malloc(bytes); in malloc()
116 result = Malloc(malloc)(bytes); in malloc()
119 warning_log("malloc(%zu) failed: returning null pointer", bytes); in malloc()
134 extern "C" void* memalign(size_t alignment, size_t bytes) { in memalign() argument
137 return MaybeTagPointer(dispatch_table->memalign(alignment, bytes)); in memalign()
139 void* result = Malloc(memalign)(alignment, bytes); in memalign()
141 warning_log("memalign(%zu, %zu) failed: returning null pointer", alignment, bytes); in memalign()
172 extern "C" __attribute__((__noinline__)) void* realloc(void* old_mem, size_t bytes) { in realloc() argument
176 return MaybeTagPointer(dispatch_table->realloc(old_mem, bytes)); in realloc()
[all …]
Dgwp_asan_wrappers.cpp113 size_t bytes; in gwp_asan_calloc() local
114 if (!__builtin_mul_overflow(n_elements, elem_size, &bytes)) { in gwp_asan_calloc()
115 if (void* result = GuardedAlloc.allocate(bytes)) { in gwp_asan_calloc()
131 void* gwp_asan_malloc(size_t bytes) { in gwp_asan_malloc() argument
133 if (void* result = GuardedAlloc.allocate(bytes)) { in gwp_asan_malloc()
137 return prev_dispatch->malloc(bytes); in gwp_asan_malloc()
147 void* gwp_asan_realloc(void* old_mem, size_t bytes) { in gwp_asan_realloc() argument
150 void* new_ptr = gwp_asan_malloc(bytes); in gwp_asan_realloc()
151 if (new_ptr) memcpy(new_ptr, old_mem, (bytes < old_size) ? bytes : old_size); in gwp_asan_realloc()
155 return prev_dispatch->realloc(old_mem, bytes); in gwp_asan_realloc()
Dbionic_elf_tls.cpp217 size_t bytes = dtv_size_in_bytes(MAX(1, loaded_cnt)); in calculate_new_dtv_count() local
218 if (!powerof2(bytes)) { in calculate_new_dtv_count()
219 bytes = BIONIC_ROUND_UP_POWER_OF_2(bytes); in calculate_new_dtv_count()
221 return (bytes - sizeof(TlsDtv)) / sizeof(void*); in calculate_new_dtv_count()
Djemalloc_wrapper.cpp26 void* je_pvalloc(size_t bytes) { in je_pvalloc() argument
28 size_t size = __BIONIC_ALIGN(bytes, pagesize); in je_pvalloc()
29 if (size < bytes) { in je_pvalloc()
Dmalloc_heapprofd.cpp380 extern "C" void* MallocInitHeapprofdHook(size_t bytes) { in MallocInitHeapprofdHook() argument
415 return previous_dispatch->malloc(bytes); in MallocInitHeapprofdHook()
417 return NativeAllocatorDispatch()->malloc(bytes); in MallocInitHeapprofdHook()
/bionic/libc/malloc_hooks/
Dmalloc_hooks.cpp63 void* hooks_memalign(size_t alignment, size_t bytes);
64 void* hooks_aligned_alloc(size_t alignment, size_t bytes);
65 void* hooks_realloc(void* pointer, size_t bytes);
66 void* hooks_calloc(size_t nmemb, size_t bytes);
77 void* hooks_pvalloc(size_t bytes);
81 static void* default_malloc_hook(size_t bytes, const void*) { in default_malloc_hook() argument
82 return g_dispatch->malloc(bytes); in default_malloc_hook()
85 static void* default_realloc_hook(void* pointer, size_t bytes, const void*) { in default_realloc_hook() argument
86 return g_dispatch->realloc(pointer, bytes); in default_realloc_hook()
93 static void* default_memalign_hook(size_t alignment, size_t bytes, const void*) { in default_memalign_hook() argument
[all …]
/bionic/libc/malloc_debug/
Dmalloc_debug.cpp91 void* debug_memalign(size_t alignment, size_t bytes);
92 void* debug_realloc(void* pointer, size_t bytes);
93 void* debug_calloc(size_t nmemb, size_t bytes);
104 void* debug_pvalloc(size_t bytes);
460 size_t bytes = InternalMallocUsableSize(pointer); in InternalMalloc() local
462 bytes = (bytes < fill_bytes) ? bytes : fill_bytes; in InternalMalloc()
463 memset(pointer, g_debug->config().fill_alloc_value(), bytes); in InternalMalloc()
494 size_t bytes; in InternalFree() local
513 bytes = header->usable_size; in InternalFree()
515 bytes = g_dispatch->malloc_usable_size(pointer); in InternalFree()
[all …]
DRecordData.cpp142 ssize_t bytes = write(dump_fd, line.c_str(), line.length()); in Dump() local
143 if (bytes == -1 || static_cast<size_t>(bytes) != line.length()) { in Dump()
DREADME.md53 in the log indicating what bytes changed.
58 If SIZE\_BYTES is present, it indicates the number of bytes in the guard.
59 The default is 32 bytes, the max bytes is 16384. SIZE\_BYTES will be
60 padded so that it is a multiple of 8 bytes on 32 bit systems and 16 bytes
79 in the log indicating what bytes changed.
81 If SIZE\_BYTES is present, it indicates the number of bytes in the guard.
82 The default is 32 bytes, the max bytes is 16384.
96 If SIZE\_BYTES is present, it indicates the number of bytes in both guards.
97 The default is 32 bytes, the max bytes is 16384.
170 filled with the value 0xeb. When doing a realloc to a larger size, the bytes
[all …]
/bionic/libc/arch-x86/atom/string/
Dssse3-memcmp-atom.S1834 je L(8bytes)
1837 je L(9bytes)
1839 je L(10bytes)
1841 je L(11bytes)
1843 je L(12bytes)
1845 je L(13bytes)
1847 je L(14bytes)
1848 jmp L(15bytes)
1850 jmp L(12bytes)
1853 je L(10bytes)
[all …]
/bionic/libc/upstream-netbsd/lib/libc/isc/
Dev_streams.c49 static void consume(evStream *str, size_t bytes);
233 consume(evStream *str, size_t bytes) { in consume() argument
234 while (bytes > 0U) { in consume()
235 if (bytes < (size_t)str->iovCur->iov_len) { in consume()
236 str->iovCur->iov_len -= bytes; in consume()
238 ((u_char *)str->iovCur->iov_base + bytes); in consume()
239 str->ioDone += bytes; in consume()
240 bytes = 0; in consume()
242 bytes -= str->iovCur->iov_len; in consume()
272 int bytes; in writable() local
[all …]
/bionic/libc/kernel/uapi/linux/netfilter/
Dxt_sctp.h45 #define bytes(type) (sizeof(type) * 8) macro
46 …e SCTP_CHUNKMAP_SET(chunkmap,type) do { (chunkmap)[type / bytes(__u32)] |= 1u << (type % bytes(__u…
47 …CTP_CHUNKMAP_CLEAR(chunkmap,type) do { (chunkmap)[type / bytes(__u32)] &= ~(1u << (type % bytes(__…
49 ({ ((chunkmap)[type / bytes(__u32)] & (1u << (type % bytes(__u32)))) ? 1 : 0; \
Dxt_set.h65 struct ip_set_counter_match0 bytes; member
78 struct ip_set_counter_match bytes; member
/bionic/libc/stdio/
Dvfscanf.cpp344 size_t bytes = 0; in __svfscanf() local
346 if (bytes == MB_CUR_MAX) { in __svfscanf()
350 buf[bytes++] = *fp->_p; in __svfscanf()
354 nconv = mbrtowc(wcp, buf, bytes, &mbs); in __svfscanf()
361 nread += bytes; in __svfscanf()
364 bytes = 0; in __svfscanf()
367 if (bytes != 0) { in __svfscanf()
433 size_t bytes = 0; in __svfscanf() local
435 if (bytes == MB_CUR_MAX) { in __svfscanf()
439 buf[bytes++] = *fp->_p; in __svfscanf()
[all …]
/bionic/libc/upstream-openbsd/lib/libc/crypt/
Dchacha_private.h89 chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes) in chacha_encrypt_bytes() argument
97 if (!bytes) return; in chacha_encrypt_bytes()
117 if (bytes < 64) { in chacha_encrypt_bytes()
118 for (i = 0;i < bytes;++i) tmp[i] = m[i]; in chacha_encrypt_bytes()
208 if (bytes <= 64) { in chacha_encrypt_bytes()
209 if (bytes < 64) { in chacha_encrypt_bytes()
210 for (i = 0;i < bytes;++i) ctarget[i] = c[i]; in chacha_encrypt_bytes()
216 bytes -= 64; in chacha_encrypt_bytes()
/bionic/linker/
Dlinker_block_allocator.cpp49 uint8_t bytes[kAllocateSize - 16] __attribute__((aligned(16))); member
96 ssize_t offset = reinterpret_cast<uint8_t*>(block) - page->bytes; in free()
129 FreeBlockInfo* first_block = reinterpret_cast<FreeBlockInfo*>(page->bytes); in create_new_page()
131 first_block->num_free_blocks = sizeof(page->bytes) / block_size_; in create_new_page()
/bionic/benchmarks/tests/
Dinterface_test.cpp127 ssize_t bytes = TEMP_FAILURE_RETRY(read(fd_, buffer, sizeof(buffer) - 1)); in RunTest() local
128 if (bytes == -1 && errno == EAGAIN) { in RunTest()
131 ASSERT_NE(-1, bytes); in RunTest()
132 if (bytes == 0) { in RunTest()
135 buffer[bytes] = '\0'; in RunTest()
/bionic/libc/kernel/uapi/mtd/
Dubi-user.h68 __s64 bytes; member
76 __s64 bytes; member
91 __s32 bytes; member
/bionic/libc/malloc_debug/tests/
Dmalloc_debug_system_tests.cpp107 ssize_t bytes = TEMP_FAILURE_RETRY(read(fds[0], buffer.data(), sizeof(buffer) - 1)); in Exec() local
108 if (bytes == -1 && errno == EAGAIN) { in Exec()
111 ASSERT_NE(-1, bytes); in Exec()
112 if (bytes == 0) { in Exec()
116 output.append(buffer.data(), bytes); in Exec()

12