This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Revised^3 precompiled header support for cygwin


On Mar  7 00:21, Christopher Faylor wrote:
> On Mon, Mar 07, 2005 at 03:55:18PM +1100, Billinghurst, David (CALCRTS) wrote:
> >This consolidates previous patches for precompiled header support for cygwin
> >  http://gcc.gnu.org/ml/gcc-patches/2004-10/msg01211.html
> >  http://gcc.gnu.org/ml/gcc-patches/2005-02/msg01765.html
> >  http://gcc.gnu.org/ml/gcc-patches/2005-02/msg01838.html
> >I am testing it with 4.0 and 4.0 in daily posts to gcc-testresults.
> >[...]
> (Corinna, should cygwin's mmap be detecting attempts to map larger than
> the size of the file and extending the file size automatically?)

I don't think so.  POSIX allows mmap's which are larger than the underlying
file, but writing to memory beyond current EOF doesn't extend the file size.

Windows OTOH would automatically extend the file size in this case.  So
Cygwin's mmap() checks if off + len > EOF and modifies len so that the file
size is not changed due to a call to mmap.  I could change the behaviour to
Windows style but it sounds wrong to me.

What we could do in future is to support a flag to this effect.  Linux and
other systems support various non-portable flags.  One documented flag is
MAP_AUTOGROW, which exists for instance on Irix.  This flags is doing exactly
what Windows does and what you're asking for, automatically extending the
size of the underlying mapped object.


Corinna


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