Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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: <20040915210751 DOT GG23012 AT trixie DOT casa DOT cgf DOT cx> <20040916084702 DOT GA29191 AT cygbert DOT vinschen DOT de> <1937224285 DOT 20040916144208 AT familiehaase DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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/