delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/05/14:03:06

X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: 1.7.0 CVS mmap failure
Date: Fri, 5 Jan 2007 19:02:47 -0000
Message-ID: <003901c730fc$16b263b0$a501a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <003401c730f9$ec28b830$a501a8c0@CAM.ARTIMI.COM>
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 05 January 2007 18:47, Dave Korn wrote:

> On 05 January 2007 18:42, Brian Ford wrote:
> 
>> On Fri, 5 Jan 2007, Corinna Vinschen wrote:
>> 
>>> In the failing case this should still work, since 0x7fff7000 + 0x9000
>>> (36864 dec) == 0x80000000, so the mapping should fit into the usual 2
>>> Gig address space.  Why Windows fails to do it, I have no idea.  The
>>> error code 487 means invalid address which might mean "already taken"
>>> address, but that's not visible in the strace.  To figure that out would
>>> require to add a bit of VirtualQuery code to mmap and add appropriate
>>> debug output.
>> 
>> I'm not quite sure exactly what this means, but I stumbled onto it in gdb:
>> 
>> (gdb) info w32 selector
>> Selector $fs
>> 0x03b: base=0x7fffe000 limit=0x00000fff 32-bit Data (Read/Write, Exp-up)
>> Priviledge level = 3. Byte granular.
>> 
>> So, it does indeed look taken.
> 
> 
>   Normally in windows you have the PEB and various TEBs living in that
> region. I have no idea how this behaves on x64 or with /3gb, but it would
> seem that it is still reserved.

  And indeed (hit send too quickly), this is a violation of the otherwise
absolute rule that everything is done in 64k pages.  I think it's a real
problem that windows would allocate the low-end partial part of the 64k page
containing the fs segment.

  Maybe cygwin just wants to allocate that range on startup and then discard
it, leaving it allocated, so that mmap doesn't ever run the risk of getting
handed a partial page that it can't allocate/map the rest of.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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