From bd57e2b43a5b56c00a82adbde0e33e5820c81164 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 4 Apr 2011 16:24:49 -0400 Subject: use a local temp buffer for unbuffered streams in vfprintf this change makes it so most calls to fprintf(stderr, ...) will result in a single writev syscall, as opposed to roughly 2*N syscalls (and possibly more) where N is the number of format specifiers. in principle we could use a much larger buffer, but it's best not to increase the stack requirements too much. most messages are under 80 chars. --- src/stdio/stderr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/stdio/stderr.c') diff --git a/src/stdio/stderr.c b/src/stdio/stderr.c index 3bdaffbc..9a70700c 100644 --- a/src/stdio/stderr.c +++ b/src/stdio/stderr.c @@ -6,6 +6,7 @@ static FILE f = { .buf_size = 0, .fd = 2, .flags = F_PERM | F_NORD, + .lbf = -1, .write = __stdio_write, .seek = __stdio_seek, .close = __stdio_close, -- cgit v1.2.1