[Patch] Fix libstdc++/11378 (3rd take)

Paolo Carlini pcarlini@unitus.it
Tue Jul 15 14:15:00 GMT 2003


Nathan Myers wrote:

>Does anybody know a circumstance where short writes are common enough 
>that performance in that case matters?
>
For sure there are other factors I currently ignore, but it seems to me 
that the relationship between BUFSIZ and PIPE_BUF is important, right? I 
understand from 
http://www.opengroup.org/onlinepubs/007904975/functions/write.html 
(please correct me asap if I'm wrong!) that if our requests were always 
smaller than PIPE_BUF a Posix conforming write would never be short.

Unfortunately, a little bit of googling reveals that on many systems 
PIPE_BUF is quite small, smaller than the already suboptimal BUFSIZ (512 
bytes on NetBSD, f.i.).

Paolo.



More information about the Libstdc++ mailing list