Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 38) sorted by relevance

12

/bionic/libc/bionic/
Dlibgen.cpp39 static int __basename_r(const char* path, char* buffer, size_t buffer_size) { in __basename_r() argument
75 if (buffer == NULL) { in __basename_r()
85 memcpy(buffer, startp, len); in __basename_r()
86 buffer[len] = 0; in __basename_r()
92 __LIBC32_LEGACY_PUBLIC__ int basename_r(const char* path, char* buffer, size_t buffer_size) { in basename_r() argument
93 return __basename_r(path, buffer, buffer_size); in basename_r()
96 static int __dirname_r(const char* path, char* buffer, size_t buffer_size) { in __dirname_r() argument
138 if (buffer == NULL) { in __dirname_r()
149 memcpy(buffer, path, len); in __dirname_r()
150 buffer[len] = 0; in __dirname_r()
[all …]
Dgetentropy.cpp34 static int getentropy_urandom(void* buffer, size_t buffer_size, int saved_errno) { in getentropy_urandom() argument
40 ssize_t count = TEMP_FAILURE_RETRY(read(fd, static_cast<char*>(buffer) + collected, in getentropy_urandom()
54 int getentropy(void* buffer, size_t buffer_size) { in getentropy() argument
64 long count = TEMP_FAILURE_RETRY(getrandom(static_cast<char*>(buffer) + collected, in getentropy()
73 return getentropy_urandom(buffer, buffer_size, saved_errno); in getentropy()
Djemalloc_wrapper.cpp74 char buffer[100]; in je_mallopt() local
76 snprintf(buffer, sizeof(buffer), "arena.%d.decay_time", i); in je_mallopt()
77 if (je_mallctl(buffer, nullptr, nullptr, &decay_time, sizeof(decay_time)) != 0) { in je_mallopt()
Dgrp_pwd.cpp367 static void print_app_name_from_uid(const uid_t uid, char* buffer, const int bufferlen) { in print_app_name_from_uid() argument
371 snprintf(buffer, bufferlen, "u%u_i%u", userid, appid - AID_ISOLATED_START); in print_app_name_from_uid()
375 snprintf(buffer, bufferlen, "u%u_%s", userid, android_ids[n].name); in print_app_name_from_uid()
380 snprintf(buffer, bufferlen, "u%u_a%u", userid, appid - AID_APP_START); in print_app_name_from_uid()
384 static void print_app_name_from_gid(const gid_t gid, char* buffer, const int bufferlen) { in print_app_name_from_gid() argument
388 snprintf(buffer, bufferlen, "u%u_i%u", userid, appid - AID_ISOLATED_START); in print_app_name_from_gid()
390 snprintf(buffer, bufferlen, "all_a%u", appid - AID_SHARED_GID_START); in print_app_name_from_gid()
392 snprintf(buffer, bufferlen, "u%u_a%u_cache", userid, appid - AID_CACHE_GID_START); in print_app_name_from_gid()
396 snprintf(buffer, bufferlen, "u%u_%s", userid, android_ids[n].name); in print_app_name_from_gid()
401 snprintf(buffer, bufferlen, "u%u_a%u", userid, appid - AID_APP_START); in print_app_name_from_gid()
/bionic/libc/async_safe/
Dasync_safe_log.cpp64 BufferOutputStream(char* buffer, size_t size) : total(0), pos_(buffer), avail_(size) { in BufferOutputStream()
238 char buffer[32]; /* temporary buffer used to format numbers */ in out_vformat() local
325 const char* str = buffer; in out_vformat()
335 buffer[0] = static_cast<char>(va_arg(args, int)); in out_vformat()
336 buffer[1] = '\0'; in out_vformat()
339 buffer[0] = '0'; in out_vformat()
340 buffer[1] = 'x'; in out_vformat()
341 format_integer(buffer + 2, sizeof(buffer) - 2, value, 'x'); in out_vformat()
374 format_integer(buffer, sizeof(buffer), value, c); in out_vformat()
376 buffer[0] = '%'; in out_vformat()
[all …]
/bionic/linker/
Dlinker_sleb128.h42 sleb128_decoder(const uint8_t* buffer, size_t count) in sleb128_decoder() argument
43 : current_(buffer), end_(buffer+count) { } in sleb128_decoder()
Ddlfcn.cpp61 void __loader_android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size) __LINKER_PUBLIC__;
106 char* buffer = __get_thread()->dlerror_buffer; in __bionic_format_dlerror() local
107 strlcpy(buffer, msg, __BIONIC_DLERROR_BUFFER_SIZE); in __bionic_format_dlerror()
109 strlcat(buffer, ": ", __BIONIC_DLERROR_BUFFER_SIZE); in __bionic_format_dlerror()
110 strlcat(buffer, detail, __BIONIC_DLERROR_BUFFER_SIZE); in __bionic_format_dlerror()
113 __bionic_set_dlerror(buffer); in __bionic_format_dlerror()
121 void __loader_android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size) { in __loader_android_get_LD_LIBRARY_PATH() argument
123 do_android_get_LD_LIBRARY_PATH(buffer, buffer_size); in __loader_android_get_LD_LIBRARY_PATH()
Dlinker_logger.cpp71 static void GetAppSpecificProperty(char* buffer) { in GetAppSpecificProperty() argument
84 __system_property_get(property_name.c_str(), buffer); in GetAppSpecificProperty()
/bionic/tests/
Dbuffer_tests.cpp208 static void SetFencepost(uint8_t *buffer) { in SetFencepost() argument
210 buffer[i] = 0xde; in SetFencepost()
211 buffer[i+1] = 0xad; in SetFencepost()
215 static void VerifyFencepost(uint8_t *buffer) { in VerifyFencepost() argument
217 if (buffer[i] != 0xde || buffer[i+1] != 0xad) { in VerifyFencepost()
219 if (buffer[i] == 0xde) { in VerifyFencepost()
225 ASSERT_EQ(expected_value, buffer[i]); in VerifyFencepost()
Dsys_socket_test.cpp221 char buffer[100]; in TestSendMMsg() local
223 static_cast<size_t>(recv(fd_acc, buffer, sizeof(buffer), 0))); in TestSendMMsg()
224 ASSERT_STREQ(g_SendMsgs[i], buffer); in TestSendMMsg()
Dstring_test.cpp800 uint8_t* buffer; in TEST() local
801 ASSERT_EQ(0, posix_memalign(reinterpret_cast<void**>(&buffer), 64, 64)); in TEST()
802 memset(buffer, 10, 64); in TEST()
803 ASSERT_TRUE(NULL == memchr(buffer, 5, 0)); in TEST()
804 ASSERT_TRUE(NULL == memchr(buffer, 10, 0)); in TEST()
968 char* buffer = reinterpret_cast<char*>(malloc(MEMMOVE_DATA_SIZE)); in TEST() local
969 ASSERT_TRUE(buffer != NULL); in TEST()
980 char* src = buffer; in TEST()
982 char* dst = buffer + 256 + i; in TEST()
994 char* dst = buffer + 256; in TEST()
[all …]
/bionic/libc/malloc_debug/tests/
Dmalloc_debug_unit_tests.cpp340 std::vector<uint8_t> buffer(32); in TEST_F() local
341 memset(buffer.data(), 0xaa, buffer.size()); in TEST_F()
345 ASSERT_TRUE(memcmp(buffer.data(), &pointer[-buffer.size()], buffer.size()) == 0) in TEST_F()
346 << ShowDiffs(buffer.data(), &pointer[-buffer.size()], buffer.size()); in TEST_F()
354 ASSERT_TRUE(memcmp(buffer.data(), &pointer[-buffer.size()], buffer.size()) == 0) in TEST_F()
355 << ShowDiffs(buffer.data(), &pointer[-buffer.size()], buffer.size()); in TEST_F()
367 ASSERT_TRUE(memcmp(buffer.data(), &pointer[-buffer.size()], buffer.size()) == 0) in TEST_F()
368 << ShowDiffs(buffer.data(), &pointer[-buffer.size()], buffer.size()); in TEST_F()
376 ASSERT_TRUE(memcmp(buffer.data(), &pointer[-buffer.size()], buffer.size()) == 0) in TEST_F()
377 << ShowDiffs(buffer.data(), &pointer[-buffer.size()], buffer.size()); in TEST_F()
[all …]
/bionic/libc/malloc_debug/
DMapData.cpp119 std::vector<char> buffer(1024); in ReadMaps() local
120 while (fgets(buffer.data(), buffer.size(), fp) != nullptr) { in ReadMaps()
121 MapEntry* entry = parse_line(buffer.data()); in ReadMaps()
DREADME_api.md12 *info* is set to a buffer allocated by the call that contains all of
14 *overall\_size* is set to the total size of the buffer returned. If this
23 In order to free the buffer allocated by the function, call:
DREADME_marshmallow_and_earlier.md78 A 32 byte buffer is placed before the returned allocation (known as
79 a front guard). This buffer is filled with the pattern (0xaa). In addition,
80 a 32 byte buffer is placed after the data for the returned allocation (known
81 as a rear guard). This buffer is filled with the pattern (0xbb).
/bionic/benchmarks/tests/
Dinterface_test.cpp117 char buffer[4097]; in Verify() local
118 ssize_t bytes = TEMP_FAILURE_RETRY(read(fd_, buffer, sizeof(buffer) - 1)); in Verify()
126 buffer[bytes] = '\0'; in Verify()
127 raw_output_ += buffer; in Verify()
/bionic/libc/upstream-netbsd/android/include/sys/
Dsha1.h21 u_char buffer[64]; member
/bionic/tools/relocation_packer/src/
Delf_file_unittest.cc50 unsigned char buffer[buffer_size]; in OpenRelocsTestFile() local
54 bytes = fread(buffer, 1, sizeof(buffer), testfile); in OpenRelocsTestFile()
55 ASSERT_EQ(bytes, fwrite(buffer, 1, bytes, temporary)); in OpenRelocsTestFile()
/bionic/libc/system_properties/
Dcontexts_split.cpp219 char* buffer = nullptr; in InitializePropertiesFromFile() local
224 while (getline(&buffer, &line_len, file) > 0) { in InitializePropertiesFromFile()
225 int items = read_spec_entries(buffer, 2, &prop_prefix, &context); in InitializePropertiesFromFile()
255 free(buffer); in InitializePropertiesFromFile()
/bionic/libdl/
Dlibdl.cpp58 void __loader_android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size);
152 void android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size) { in android_get_LD_LIBRARY_PATH() argument
153 __loader_android_get_LD_LIBRARY_PATH(buffer, buffer_size); in android_get_LD_LIBRARY_PATH()
/bionic/libc/async_safe/include/async_safe/
Dlog.h90 int async_safe_format_buffer_va_list(char* buffer, size_t buffer_size, const char* format, va_list …
/bionic/libc/kernel/uapi/linux/android/
Dbinder.h69 binder_uintptr_t buffer; member
134 binder_uintptr_t buffer; member
/bionic/libc/kernel/uapi/sound/
Dcompress_offload.h30 struct snd_compressed_buffer buffer; member
/bionic/libc/upstream-netbsd/common/lib/libc/hash/sha1/
Dsha1.c150 void SHA1Transform(uint32_t state[5], const uint8_t buffer[64]) in SHA1Transform()
159 _DIAGASSERT(buffer != 0); in SHA1Transform()
164 (void)memcpy(block, buffer, 64); in SHA1Transform()
166 block = (CHAR64LONG16 *)(void *)buffer; in SHA1Transform()
250 (void)memcpy(&context->buffer[j], data, (i = 64-j)); in SHA1Update()
251 SHA1Transform(context->state, context->buffer); in SHA1Update()
258 (void)memcpy(&context->buffer[j], &data[i], len - i); in SHA1Update()
/bionic/libc/kernel/uapi/linux/
Dusbdevice_fs.h75 void __user * buffer; member

12