This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A sick idea - mmapped file output


On Sun, Nov 05, 2000 at 07:29:19PM -0700, Jeffrey A Law wrote:
>   In message <Pine.GSO.4.21.0011030702120.19361-100000@platon>you write:
>   > Hi,
>   > 
>   > On Thu, 2 Nov 2000, Zack Weinberg wrote:
>   > > 
>   > > However, you can anticipate running off the end and extend the file
>   > > with ftruncate.  POSIX and SUS don't guarantee that this works, but
>   > > assuming it does, this is indeed faster than write(2) - until you run
>   > > out of mapping, at which point you have a problem.  Or, even cleverer,
>   > > you can catch the signal and extend it then, but this doesn't seem to
>   > > be any faster than anticipating the end (not surprising; signals ain't
>   > > cheap).  
>   > 
>   > Hmm, although it's not really clear if there is a benefit in real
>   > situations (like compiling a program with optimizations ;-) ), there is
>   > also not a real reason why we shouldn't do it if we can (and the system
>   > supports it).
> I disagree strongly.
> 
> What Zack is effectively proposing is that we code to specific features
> of implementations instead of a standard.  ie, if the spec doesn't spell
> this out as defined behavior, then we should not use it.

The idea's been beaten to death, now.  I was blaming the kernel for
stdio's problems.  Neil said he was going to do something with
direct-to-write, and we've got the integrated preprocessor going so we
aren't doing I/O anymore.

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]