glibc calls more write() than necessary
Carlos O'Donell
carlos@systemhalted.org
Sat Jan 27 22:20:00 GMT 2007
On 1/21/07, Matthieu Lemerre <racin@free.fr> wrote:
> I first agreed to this, but I then tried the following test case:
>
> int
> main (int argc, char **argv)
> {
> printf ("\n"); /* Does not work when there is only one printf. */
> printf ("\nhello\n\n\n\n\n\n\n\nee\nee\n\n\n\nee\n\n\n\n\n\n");
> }
>
> So flushes are already sometimes done together.
>
> Note: The second printf compacts the write only if there was already a
> non-empty printf before. I guess it depends on whether a buffer has
> already been allocated or not.
File a bug?
http://sources.redhat.com/bugzilla/
c.
More information about the Libc-alpha
mailing list