|
Message-ID: <1453030369.29168.6.camel@inria.fr>
Date: Sun, 17 Jan 2016 12:32:49 +0100
From: Jens Gustedt <jens.gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: Re: Non-stub setvbuf
Am Sonntag, den 17.01.2016, 12:03 +0100 schrieb Markus Wichmann:
> On Sun, Jan 17, 2016 at 09:59:52AM +0100, Jens Gustedt wrote:
> > How about just using setvbuf as an indication that the user wants the
> > buffer to be scrubbed? And so just zero it?
> >
> > I wouldn't expect setvbuf to be used in places that are performance
> > critical, so an additional memset shouldn't do much harm, I think.
> >
>
> That isn't the use everyone has for it. I routinely set stdout and stdin
> to line buffered in my programs, because glibc sets the buffering mode
> for these streams based on file type, and I want to be consistent in all
> cases. And those applications can be performance critical.
>
> But then, I provide no buffer to these calls, so maybe differentiate on
> that?
Yes, sorry, I wasn't clear enough. This is what I meant, only scrub
buffers if the user provides a buffer argument.
Jens
--
:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536 ::
:: :::::::::::::::::::::: gsm France : +33 651400183 ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.