Increase BUFSIZ to 8192

Poul-Henning Kamp phk at phk.freebsd.dk
Thu May 14 15:08:41 UTC 2015


--------
In message <1431615185.1221.57.camel at freebsd.org>, Ian Lepore writes:

>I think we've got differing interpretations of what BUFSIZ is for.
>
>IMO, the one correct use of BUFSIZ outside of libc is "if you are going
>to call setbuf() the buffer you pass must be BUFSIZ bytes long."
>
>Over the years, it seems that many people have somehow gotten the
>impression that the intent was "BUFSIZ is the right/ideal/whatever size
>to allocate general purpose IO buffers in any program" 

I don't know when you started, but when I started, on sys-III and
v7 in the mid 1980ies, that was exactly what people told you:
"Do disk-I/O in BUFSIZ units".

I did a quick sampling of src and that seems to be exactly how it is
being used in most of the cases I looked at, including libmd where
I put it there on exactly that reason back in 1994 (5?)

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-current mailing list