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 Message-ID: <421F0E0A.6070203@stambulchik.net> Date: Fri, 25 Feb 2005 13:37:46 +0200 From: Evgeny Stambulchik 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 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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/