Re: Increase BUFSIZ to 8192

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Thu, 14 May 2015 15:08:38 +0000
--------
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.
Received on Thu May 14 2015 - 13:08:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:57 UTC