Re: mmap and MAP_FIXED

2005-03-01 Thread Corinna Vinschen
On Feb 25 16:18, Corinna Vinschen wrote: > On Feb 25 06:35, Eric Blake wrote: > > While you are at it, POSIX requires an update to underlying file's ctime > > sometime between mmap(... MAP_SHARED, PROT_WRITE ...) and the > > corresponding munmap() or msync() if the mapped region was written to. If

Re: mmap and MAP_FIXED

2005-02-27 Thread Evgeny Stambulchik
Tried cygwin1-20050225.dll. Things seem to work fine now. Thanks, Corinna! 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

Re: mmap and MAP_FIXED

2005-02-25 Thread Corinna Vinschen
On Feb 25 06:35, Eric Blake wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > According to Corinna Vinschen on 2/25/2005 5:00 AM: > > The reason that MAP_FAILED only works on 64K boundaries so far is, > > that I didn't handle this case. Usually there are not many good > > reasons to us

Re: mmap and MAP_FIXED

2005-02-25 Thread Evgeny Stambulchik
Corinna Vinschen wrote: You shouldn't just use some arbitrary address and use MAP_FIXED with it, otherwise you're making invaild assumptions about the memory layout of your machine/os/application. I know. It was just a test code to demo this 64K strangeness. In reality, I use addresses which have

Re: mmap and MAP_FIXED

2005-02-25 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Corinna Vinschen on 2/25/2005 5:00 AM: > The reason that MAP_FAILED only works on 64K boundaries so far is, > that I didn't handle this case. Usually there are not many good > reasons to use MAP_FIXED. However, I've checked in a patch wh

Re: mmap and MAP_FIXED

2005-02-25 Thread Corinna Vinschen
On Feb 25 01:17, Evgeny Stambulchik wrote: > Hello, > > There is something strange about mmap(addr, ..., MAP_FIXED) under > Cygwin. For a reason, it always fails if addr is not on a 16xPAGE_SIZE > boundary. Here is a short demo: > > #include > #include > #include > #include > #include > #i

Re: mmap and MAP_FIXED

2005-02-25 Thread Evgeny Stambulchik
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 yo

Re: mmap and MAP_FIXED

2005-02-24 Thread Sean Daley
Evgeny Stambulchik wrote: > Christopher Faylor wrote: > > > See: > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/mapviewoffileex.asp > > > > Pay particular attention to the description of lpBaseAddress. > > Thanks! It doesn't explain, though, how mmap manages to

Re: mmap and MAP_FIXED

2005-02-24 Thread Evgeny Stambulchik
Christopher Faylor wrote: See: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/mapviewoffileex.asp Pay particular attention to the description of lpBaseAddress. Thanks! It doesn't explain, though, how mmap manages to avoid this 64k restriction when MAP_FIXED is NOT set

Re: mmap and MAP_FIXED

2005-02-24 Thread Christopher Faylor
On Fri, Feb 25, 2005 at 01:17:52AM +0200, Evgeny Stambulchik wrote: >There is something strange about mmap(addr, ..., MAP_FIXED) under >Cygwin. For a reason, it always fails if addr is not on a 16xPAGE_SIZE >boundary. Here is a short demo: See: http://msdn.microsoft.com/library/default.asp?url=/