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


  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.

Furthermore, this should not be a long term issue since we hopefully
won't be doing IO.

jeff

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