delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/02/25/06:46:26

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
Message-ID: <421F0E0A.6070203@stambulchik.net>
Date: Fri, 25 Feb 2005 13:37:46 +0200
From: Evgeny Stambulchik <evgeny AT stambulchik DOT net>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: mmap and MAP_FIXED

Sean Daley wrote:

> Read the description to lpBaseAddress again and then read the
> following comment from
> cygwin's mmap code:
> /* If a non-zero address is given, try mapping using the given address first.
>    If it fails and flags is not MAP_FIXED, try again with NULL address. */

I did. Now may I ask you in exchange to re-read my previous posts?

Again, it's a mistery to me why e.g. mmap(0x641000,...), although not 
forced to, does return the _suggested_ 0x641000 _exactly_, whereas 
mmap(0x641000,..., MAP_FIXED) fails?!

> Also, the Linux man page for mmap pretty much sums it up as follows:

mmap on Linux works flawlessly with MAP_FIXED, according to the POSIX 
requirements - i.e., as far as the address is on the page boundary. In 
cygwin, it's not the case; instead, alignment to the "granularity" of 
the mem allocations is needed. BTW, can I get this value from the Cygwin 
API or need to query Win32 directly?

Regards,

Evgeny

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