This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] Do not break buffers in fvwrite for unbuffered files
- From: Federico Terraneo <fede dot tft at hotmail dot it>
- To: newlib at sourceware dot org
- Date: Mon, 21 Oct 2013 16:15:05 +0200
- Subject: Re: [PATCH] Do not break buffers in fvwrite for unbuffered files
- Authentication-results: sourceware.org; auth=none
- References: <BLU0-SMTP3706870746E06F88A8C1B14F9010 at phx dot gbl> <20131021115449 dot GB2480 at calimero dot vinschen dot de> <BLU0-SMTP29839CC88E871E7C3AC31A5F9010 at phx dot gbl> <20131021124701 dot GC2480 at calimero dot vinschen dot de>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/21/2013 02:47 PM, Corinna Vinschen wrote:
>
> Maye it makes sense to use the largest multiple of BUFSIZ <=
> MAX_INT. See below.
>>
>> I'm wondering if it makes sense to avoid splitting writes (and
>> reads) also for buffered files. glibc appears to do it,
>
> Buffered writes are already split into fp->_bf._size chunks.
> Glibc basically uses the largest multiple of fp->_bf._size <= len
> instead. We could do the same. Would you like to create a patch
> for that?
I'll have a look at what can be done in the next days.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSZTbmAAoJECkLFtN5Xr9fiH8H/2zCqZG1B+LtJyGFWPAxidzf
KBahYj4RPWb172AbwPrDUjE6k6NZEeiAANQnig8caLr+bodsFkY66Ez4ztVt8jXl
vKs+Mn5ONuhB0vMDLGjhvhElMdvwlpT1AHGX5aYob0I2NJ1hutXqk6MUodnuZwNZ
fKnsMYLU3x41QHDK0O2kC5fTewgDJSKNbB0Nwc2UP1b5pFOLWoPKTVI3ZFlIIOrG
rhEG++OKoQdpG/OYIMmJ7EJLBnOek5YYzpKwutH8Z/u8TkeKbYrm0lDnO+Ku+lDE
TwWW40vJCjF4p1Ymt95n6Z1Rc3wWcr1DfNXK1RPzmEhrG5hE6GoYPEhPZ/qNJcc=
=fPwT
-----END PGP SIGNATURE-----