Lines Matching refs:buffer
41 // Appends number in a given base to buffer. If its length is less than
60 RAW_CHECK_MSG((uptr)pos < kMaxLen, "AppendNumber buffer overflow");
237 // hand, the bigger the buffer is, the more the chance the error report will
241 char *buffer = local_buffer;
243 // First try to print a message using a local buffer, and then fall back to
244 // mmaped buffer.
249 buffer = (char*)MmapOrDie(kLen, "Report");
255 needed_length += internal_snprintf(buffer, buffer_size, "==%d==", pid);
257 // The pid doesn't fit into the current buffer.
260 RAW_CHECK_MSG(needed_length < kLen, "Buffer in Report is too short!\n");
263 needed_length += VSNPrintf(buffer + needed_length,
266 // The message doesn't fit into the current buffer.
269 RAW_CHECK_MSG(needed_length < kLen, "Buffer in Report is too short!\n");
271 // If the message fit into the buffer, print it and exit.
274 RawWrite(buffer);
275 AndroidLogWrite(buffer);
276 CallPrintfAndReportCallback(buffer);
278 if (buffer != local_buffer)
279 UnmapOrDie((void *)buffer, buffer_size);
300 // Writes at most "length" symbols to "buffer" (including trailing '\0').
301 // Returns the number of symbols that should have been written to buffer
305 int internal_snprintf(char *buffer, uptr length, const char *format, ...) {
308 int needed_length = VSNPrintf(buffer, length, format, args);