delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/16/09:25:35

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Thu, 16 Sep 2004 15:25:50 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: checking for working mmap...no
Message-ID: <20040916132550.GA491@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <uk6uvnxt9 DOT fsf AT gnu DOT org> <20040915210751 DOT GG23012 AT trixie DOT casa DOT cgf DOT cx> <ullfbtb6l DOT fsf AT gnu DOT org> <20040916084702 DOT GA29191 AT cygbert DOT vinschen DOT de> <1937224285 DOT 20040916144208 AT familiehaase DOT de>
Mime-Version: 1.0
In-Reply-To: <1937224285.20040916144208@familiehaase.de>
User-Agent: Mutt/1.4.2i

On Sep 16 14:42, Gerrit P. Haase wrote:
> Am Donnerstag, 16. September 2004 um 10:47 schriebst du:
> > The mmap test is crap.  How can an application expect to be able to
> > access just about every address together with MAP_FIXED?
> 
> > Consequentially MapViewOfFileEx returns error 487 in these cases,
> > "Attempt to access invalid address."
> 
> > That's just another example of a crappy autoconf mmap test.
> 
> This means that mmap is actually working?  Probably the best option
> would be to fix the test in the upstream sources, so it will just work
> automatically then?  Maybe fixing it in the -devel autoconf release
> for now would be sufficient too?  Charles?

mmap works fine for a long time already, as long as you work strictly
SUSv3 conformant.  The code also tries hard to accomodate usual border
cases (like, say, the expectation that two consecutively mmaped pages
are located adjacent in memory), but code like the one in this thread
is just way off.

The test in question doesn't look like the standard autoconf test btw.,
it looks like a handcrafted one, but I could be wrong.

Dunno what the current autoconf mmap test does, but the original test
back in 2.13 times was as crappy as this one.  It malloc'd an area
and expected that it then can mmap it.  That won't work on every system
and it certainly doesn't work on Windows.  Random use of MAP_FIXED is
just a good way to create non-portable code.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          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