delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/17/05:40:23

X-Spam-Check-By: sourceware.org
Date: Wed, 17 Jan 2007 11:39:59 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.0 CVS mmap failure
Message-ID: <20070117103959.GA23172@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20070105095752 DOT GB28768 AT calimero DOT vinschen DOT de> <Pine DOT CYG DOT 4 DOT 58 DOT 0701050959060 DOT 2704 AT PC1163-8460-XP DOT flightsafety DOT com> <Pine DOT CYG DOT 4 DOT 58 DOT 0701051054010 DOT 280 AT PC1163-8460-XP DOT flightsafety DOT com> <Pine DOT CYG DOT 4 DOT 58 DOT 0701051144030 DOT 2880 AT PC1163-8460-XP DOT flightsafety DOT com> <20070105182234 DOT GC12776 AT calimero DOT vinschen DOT de> <Pine DOT CYG DOT 4 DOT 58 DOT 0701051237090 DOT 2880 AT PC1163-8460-XP DOT flightsafety DOT com> <20070105192302 DOT GD12776 AT calimero DOT vinschen DOT de> <20070110095345 DOT GL23638 AT calimero DOT vinschen DOT de> <Pine DOT CYG DOT 4 DOT 58 DOT 0701100903410 DOT 3236 AT PC1163-8460-XP DOT flightsafety DOT com> <Pine DOT CYG DOT 4 DOT 58 DOT 0701161717400 DOT 2732 AT PC1163-8460-XP DOT flightsafety DOT com>
Mime-Version: 1.0
In-Reply-To: <Pine.CYG.4.58.0701161717400.2732@PC1163-8460-XP.flightsafety.com>
User-Agent: Mutt/1.4.2.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Jan 16 17:28, Brian Ford wrote:
> 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.

Ouch, right.  I'll fix that.

> Maybe the retries can then be removed from the other two
> locations?

They might be unnecessary now, but OTOH they don't hurt.  I'll add
a comment but keep the code for now.

> 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?

There's only one such call in list::set.

Your observation is strange.  The first mapping, which really maps the
file, calls fstat.  The second (valid remainder) and third (sigbus area)
mapping are anonymous mappings, which don't call fstat.  In my tests,
fstat64 is called only once for a file mapping.  STC?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019