delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/03/10:30:22

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Thu, 3 Jul 2003 16:30:10 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: mmap() and gcc precompiled headers
Message-ID: <20030703143010.GV1165@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <3F034280 DOT 6070908 AT agilent DOT com> <20030703094728 DOT GC22232 AT cygbert DOT vinschen DOT de> <20030703141942 DOT GB25320 AT redhat DOT com>
Mime-Version: 1.0
In-Reply-To: <20030703141942.GB25320@redhat.com>
User-Agent: Mutt/1.4.1i

On Thu, Jul 03, 2003 at 10:19:42AM -0400, Christopher Faylor wrote:
> On Thu, Jul 03, 2003 at 11:47:28AM +0200, Corinna Vinschen wrote:
> >Do you mean something like this:
> >
> >  If addr is given, check if it's 64K aligned.  If not, align and
> >  raise the memory requirement accordingly.  Call MapViewOfFileEx
> >  with the aligned address.  If it works, return the addr given as
> >  parameter, otherwise return MapViewOfFileEx(NULL).
> 
> How about, instead, just use the address and if it fails and is not
> MAP_FIXED, use MapViewOfFileEx without the address?

Yep, that's the simple approach.  I dropped this suggestion from my
original reply since it requires addr to be on a 64k boundary.  
Unfortunately I have no idea if the chance to succeed might be better
or worse than using the more complex approach.

Either way, it's not us but gcc being on the wrong track.  If gcc relies
on getting the same address it should use MAP_FIXED at least on hosts
known to support MAP_FIXED correctly.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

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