Home
last modified time | relevance | path

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

123

/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 == nullptr) { 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 == nullptr) { in __dirname_r()
149 memcpy(buffer, path, len); in __dirname_r()
150 buffer[len] = 0; in __dirname_r()
[all …]
Djemalloc_wrapper.cpp93 char buffer[100]; in je_mallopt() local
95 snprintf(buffer, sizeof(buffer), "arena.%d.dirty_decay_ms", i); in je_mallopt()
96 if (je_mallctl(buffer, nullptr, nullptr, &decay_time_ms, sizeof(decay_time_ms)) != 0) { in je_mallopt()
99 snprintf(buffer, sizeof(buffer), "arena.%d.muzzy_decay_ms", i); in je_mallopt()
100 if (je_mallctl(buffer, nullptr, nullptr, &decay_time_ms, sizeof(decay_time_ms)) != 0) { in je_mallopt()
118 char buffer[100]; in je_mallopt() local
119 snprintf(buffer, sizeof(buffer), "arena.%u.purge", narenas); in je_mallopt()
120 if (je_mallctl(buffer, nullptr, nullptr, nullptr, 0) != 0) { in je_mallopt()
Dgetentropy.cpp36 static int getentropy_urandom(void* buffer, size_t buffer_size, int saved_errno) { in getentropy_urandom() argument
42 ssize_t count = TEMP_FAILURE_RETRY(read(fd.get(), static_cast<char*>(buffer) + collected, in getentropy_urandom()
52 int getentropy(void* buffer, size_t buffer_size) { in getentropy() argument
62 long count = TEMP_FAILURE_RETRY(getrandom(static_cast<char*>(buffer) + collected, in getentropy()
71 return getentropy_urandom(buffer, buffer_size, saved_errno); in getentropy()
Dexecinfo.cpp88 int backtrace(void** buffer, int size) { in backtrace() argument
93 StackState state(buffer, size); in backtrace()
98 char** backtrace_symbols(void* const* buffer, int size) { in backtrace_symbols() argument
112 backtrace_symbols_fd(buffer, size, fd.get()); in backtrace_symbols()
165 void backtrace_symbols_fd(void* const* buffer, int size, int fd) { in backtrace_symbols_fd() argument
171 void* address = buffer[frame_num]; in backtrace_symbols_fd()
Dgwp_asan_wrappers.cpp319 char buffer[PROP_VALUE_MAX]; in GetGwpAsanIntegerOption() local
320 if (!GetGwpAsanOptionImpl(buffer, mallopt_options, system_sysprop, app_sysprop, in GetGwpAsanIntegerOption()
325 unsigned long long value = strtoull(buffer, &end, 10); in GetGwpAsanIntegerOption()
328 buffer); in GetGwpAsanIntegerOption()
340 char buffer[PROP_VALUE_MAX] = {}; in GetGwpAsanBoolOption() local
341 if (!GetGwpAsanOptionImpl(buffer, mallopt_options, system_sysprop, app_sysprop, in GetGwpAsanBoolOption()
346 if (strncasecmp(buffer, "1", PROP_VALUE_MAX) == 0 || in GetGwpAsanBoolOption()
347 strncasecmp(buffer, "true", PROP_VALUE_MAX) == 0) { in GetGwpAsanBoolOption()
350 } else if (strncasecmp(buffer, "0", PROP_VALUE_MAX) == 0 || in GetGwpAsanBoolOption()
351 strncasecmp(buffer, "false", PROP_VALUE_MAX) == 0) { in GetGwpAsanBoolOption()
[all …]
Dgrp_pwd.cpp366 static void print_app_name_from_uid(const uid_t uid, char* buffer, const int bufferlen) { in print_app_name_from_uid() argument
370 snprintf(buffer, bufferlen, "u%u_i%u", userid, appid - AID_ISOLATED_START); in print_app_name_from_uid()
373 snprintf(buffer, bufferlen, "u%u_%s", userid, android_id_info->name); in print_app_name_from_uid()
376 snprintf(buffer, bufferlen, "u%u_a%u", userid, appid - AID_APP_START); in print_app_name_from_uid()
380 static void print_app_name_from_gid(const gid_t gid, char* buffer, const int bufferlen) { in print_app_name_from_gid() argument
384 snprintf(buffer, bufferlen, "u%u_i%u", userid, appid - AID_ISOLATED_START); in print_app_name_from_gid()
386 snprintf(buffer, bufferlen, "all_a%u", appid - AID_SHARED_GID_START); in print_app_name_from_gid()
388 snprintf(buffer, bufferlen, "u%u_a%u_ext_cache", userid, appid - AID_EXT_CACHE_GID_START); in print_app_name_from_gid()
390 snprintf(buffer, bufferlen, "u%u_a%u_ext", userid, appid - AID_EXT_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()
[all …]
Dmalloc_common_dynamic.cpp427 &leak_info->buffer, &leak_info->overall_size, &leak_info->info_size, in GetMallocLeakInfo()
438 reinterpret_cast<free_malloc_leak_info_func_t>(func)(leak_info->buffer); in FreeMallocLeakInfo()
573 *info = leak_info.buffer; in get_malloc_leak_info()
582 android_mallopt_leak_info_t leak_info = { .buffer = info }; in free_malloc_leak_info()
/bionic/libc/async_safe/
Dasync_safe_log.cpp82 BufferOutputStream(char* buffer, size_t size) : total(0), pos_(buffer), avail_(size) { in BufferOutputStream()
257 char buffer[64]; // temporary buffer used to format numbers/format errno string in out_vformat() local
347 const char* str = buffer; in out_vformat()
354 buffer[0] = static_cast<char>(va_arg(args, int)); in out_vformat()
355 buffer[1] = '\0'; in out_vformat()
358 buffer[0] = '0'; in out_vformat()
359 buffer[1] = 'x'; in out_vformat()
360 format_integer(buffer + 2, sizeof(buffer) - 2, value, 'x'); in out_vformat()
362 strerror_r(errno, buffer, sizeof(buffer)); in out_vformat()
396 buffer[0] = '0'; in out_vformat()
[all …]
/bionic/tests/
Dmalloc_iterate_test.cpp107 std::vector<char> buffer(64 * 1024); in VerifyPtrs() local
112 bool parsed = android::procinfo::ReadMapFileAsyncSafe("/proc/self/maps", buffer.data(), in VerifyPtrs()
113 buffer.size(), callback); in VerifyPtrs()
205 char buffer[256]; in TEST() local
208 len = async_safe_format_buffer(buffer, sizeof(buffer), "Failed on map %s: %zu\n", name, in TEST()
211 len = async_safe_format_buffer(buffer, sizeof(buffer), in TEST()
216 write(STDOUT_FILENO, buffer, len); in TEST()
222 std::vector<char> buffer(64 * 1024); in TEST() local
229 bool parsed = android::procinfo::ReadMapFileAsyncSafe("/proc/self/maps", buffer.data(), in TEST()
230 buffer.size(), callback); in TEST()
Dbuffer_tests.cpp209 static void SetFencepost(uint8_t *buffer) { in SetFencepost() argument
211 buffer[i] = 0xde; in SetFencepost()
212 buffer[i+1] = 0xad; in SetFencepost()
216 static void VerifyFencepost(uint8_t *buffer) { in VerifyFencepost() argument
218 if (buffer[i] != 0xde || buffer[i+1] != 0xad) { in VerifyFencepost()
220 if (buffer[i] == 0xde) { in VerifyFencepost()
226 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()
/bionic/libc/include/
Dexecinfo.h50 int backtrace(void* _Nonnull * _Nonnull buffer, int size) __INTRODUCED_IN(33);
62 char* _Nullable * _Nullable backtrace_symbols(void* _Nonnull const* _Nonnull buffer, int size) __IN…
72 void backtrace_symbols_fd(void* _Nonnull const* _Nonnull buffer, int size, int fd) __INTRODUCED_IN(…
/bionic/libc/execinfo/include/bionic/
Dexecinfo.h50 int backtrace(void* _Nonnull * _Nonnull buffer, int size) __INTRODUCED_IN(33);
62 char* _Nullable * _Nullable backtrace_symbols(void* _Nonnull const* _Nonnull buffer, int size) __IN…
72 void backtrace_symbols_fd(void* _Nonnull const* _Nonnull buffer, int size, int fd) __INTRODUCED_IN(…
/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.cpp64 void __loader_android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size) __LINKER_PUBLIC__;
111 char* buffer = __get_thread()->dlerror_buffer; in __bionic_format_dlerror() local
112 strlcpy(buffer, msg, __BIONIC_DLERROR_BUFFER_SIZE); in __bionic_format_dlerror()
114 strlcat(buffer, ": ", __BIONIC_DLERROR_BUFFER_SIZE); in __bionic_format_dlerror()
115 strlcat(buffer, detail, __BIONIC_DLERROR_BUFFER_SIZE); in __bionic_format_dlerror()
118 __bionic_set_dlerror(buffer); in __bionic_format_dlerror()
126 void __loader_android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size) { in __loader_android_get_LD_LIBRARY_PATH() argument
128 do_android_get_LD_LIBRARY_PATH(buffer, buffer_size); in __loader_android_get_LD_LIBRARY_PATH()
Dlinker_logger.cpp70 static void GetAppSpecificProperty(char* buffer) { in GetAppSpecificProperty() argument
83 __system_property_get(property_name.c_str(), buffer); in GetAppSpecificProperty()
/bionic/libdl/
Dlibdl.cpp29 void __loader_android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size);
62 void __loader_android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size);
81 void android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size) { in android_get_LD_LIBRARY_PATH() argument
82 __loader_android_get_LD_LIBRARY_PATH(buffer, buffer_size); in android_get_LD_LIBRARY_PATH()
Dlibdl_android.cpp28 void __loader_android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size);
64 void android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size) { in android_get_LD_LIBRARY_PATH() argument
65 __loader_android_get_LD_LIBRARY_PATH(buffer, buffer_size); in android_get_LD_LIBRARY_PATH()
/bionic/libc/malloc_debug/tests/
Dmalloc_debug_unit_tests.cpp456 std::vector<uint8_t> buffer(32); in TEST_F() local
457 memset(buffer.data(), 0xaa, buffer.size()); in TEST_F()
461 ASSERT_TRUE(memcmp(buffer.data(), &pointer[-buffer.size()], buffer.size()) == 0) in TEST_F()
462 << ShowDiffs(buffer.data(), &pointer[-buffer.size()], buffer.size()); in TEST_F()
470 ASSERT_TRUE(memcmp(buffer.data(), &pointer[-buffer.size()], buffer.size()) == 0) in TEST_F()
471 << ShowDiffs(buffer.data(), &pointer[-buffer.size()], buffer.size()); in TEST_F()
483 ASSERT_TRUE(memcmp(buffer.data(), &pointer[-buffer.size()], buffer.size()) == 0) in TEST_F()
484 << ShowDiffs(buffer.data(), &pointer[-buffer.size()], buffer.size()); in TEST_F()
492 ASSERT_TRUE(memcmp(buffer.data(), &pointer[-buffer.size()], buffer.size()) == 0) in TEST_F()
493 << ShowDiffs(buffer.data(), &pointer[-buffer.size()], buffer.size()); in TEST_F()
[all …]
/bionic/benchmarks/tests/
Dinterface_test.cpp126 char buffer[4097]; in RunTest() local
127 ssize_t bytes = TEMP_FAILURE_RETRY(read(fd_, buffer, sizeof(buffer) - 1)); in RunTest()
135 buffer[bytes] = '\0'; in RunTest()
136 raw_output_ += buffer; in RunTest()
/bionic/libc/malloc_debug/
DMapData.cpp153 std::vector<char> buffer(1024); in ReadMaps() local
154 while (fgets(buffer.data(), buffer.size(), fp) != nullptr) { in ReadMaps()
155 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:
/bionic/libc/system_properties/
Dcontexts_split.cpp217 char* buffer = nullptr; in InitializePropertiesFromFile() local
222 while (getline(&buffer, &line_len, file) > 0) { in InitializePropertiesFromFile()
223 int items = read_spec_entries(buffer, 2, &prop_prefix, &context); in InitializePropertiesFromFile()
253 free(buffer); in InitializePropertiesFromFile()
/bionic/libc/upstream-netbsd/android/include/sys/
Dsha1.h21 u_char buffer[64]; member
/bionic/libc/async_safe/include/async_safe/
Dlog.h68 int async_safe_format_buffer_va_list(char* buffer, size_t buffer_size, const char* format, va_list …

123