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, 3 Jul 2003 10:32:56 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: mmap() and gcc precompiled headers Message-ID: <20030703143255.GE25320@redhat.com> 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> <20030703143010 DOT GV1165 AT cygbert DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030703143010.GV1165@cygbert.vinschen.de> User-Agent: Mutt/1.4.1i On Thu, Jul 03, 2003 at 04:30:10PM +0200, Corinna Vinschen wrote: >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. Anyone want to try patching gcc and sending a message to gcc-patches? cgf -- 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/