X-Spam-Check-By: sourceware.org
Date: Tue, 16 Jan 2007 17:28:20 -0600
From: Brian Ford <Brian.Ford@FlightSafety.com>
Reply-To: cygwin@cygwin.com
To: cygwin@cygwin.com
Subject: Re: 1.7.0 CVS mmap failure
In-Reply-To: <Pine.CYG.4.58.0701100903410.3236@PC1163-8460-XP.flightsafety.com>
Message-ID: <Pine.CYG.4.58.0701161717400.2732@PC1163-8460-XP.flightsafety.com>
References: <Pine.CYG.4.58.0701041715140.3520@PC1163-8460-XP.flightsafety.com>   <20070105095752.GB28768@calimero.vinschen.de>   <Pine.CYG.4.58.0701050959060.2704@PC1163-8460-XP.flightsafety.com>   <Pine.CYG.4.58.0701051054010.280@PC1163-8460-XP.flightsafety.com>   <Pine.CYG.4.58.0701051144030.2880@PC1163-8460-XP.flightsafety.com>   <20070105182234.GC12776@calimero.vinschen.de>   <Pine.CYG.4.58.0701051237090.2880@PC1163-8460-XP.flightsafety.com>   <20070105192302.GD12776@calimero.vinschen.de> <20070110095345.GL23638@calimero.vinschen.de>  <Pine.CYG.4.58.0701100903410.3236@PC1163-8460-XP.flightsafety.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Wed, 10 Jan 2007, Brian Ford wrote:

> On Wed, 10 Jan 2007, Corinna Vinschen wrote:
>
> > I implemented the above mentioned technique, which isn't much code
> > anyway.  It reserves a memory lot big enough to fit in the whole
> > mapping, memorizes the address, free's the memory again and then uses
> > the new address in the subsequent real mappings.
> >
> > This should work (knock on wood) on all systems now.  My testcases still
> > work on my 512 MB machine, so I'd appreciate if you could give the latest
> > snapshot a try on /3GB enabled machines.
>
> Yes, this fixes my STC and the application from which it was derived.
> Thanks.

But, it breaks another application that supplies a suggested mmap address
(not MAP_FIXED) that is not available.  The VirtualAlloc needs a retry in
that case.  Maybe the retries can then be removed from the other two
locations?

I'd try a patch, but I'm afraid I'd not catch all the cases
correctly.  Let me know if you'd prefer I try anyway.

Thanks.

PS: In an strace of this, I see three fstat64s called from within a
single mmap64.  Do you know where they all are, and if two should be
optimized away?

-- 
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

