This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]