Lines Matching refs:buffer
66 char buffer[256]; in tidToName() local
67 snprintf(buffer, sizeof(buffer), "/proc/%u/comm", tid); in tidToName()
68 int fd = open(buffer, O_RDONLY); in tidToName()
70 ssize_t ret = read(fd, buffer, sizeof(buffer)); in tidToName()
71 if (ret >= (ssize_t)sizeof(buffer)) { in tidToName()
72 ret = sizeof(buffer) - 1; in tidToName()
74 while ((ret > 0) && isspace(buffer[ret - 1])) { in tidToName()
78 buffer[ret] = '\0'; in tidToName()
79 retval = strdup(buffer); in tidToName()
109 size_t LogBufferElement::populateDroppedMessage(char *&buffer, in populateDroppedMessage() argument
172 buffer = static_cast<char *>(calloc(1, hdrLen + len + 1)); in populateDroppedMessage()
173 if (!buffer) { in populateDroppedMessage()
182 reinterpret_cast<android_log_event_string_t *>(buffer); in populateDroppedMessage()
189 buffer[0] = ANDROID_LOG_INFO; in populateDroppedMessage()
190 strcpy(buffer + 1, tag); in populateDroppedMessage()
193 snprintf(buffer + hdrLen, len + 1, format_uid, mUid, name ? name : "", in populateDroppedMessage()
222 char *buffer = NULL; in flushTo() local
225 entry.len = populateDroppedMessage(buffer, parent); in flushTo()
229 iovec[1].iov_base = buffer; in flushTo()
238 if (buffer) { in flushTo()
239 free(buffer); in flushTo()