This is the mail archive of the
mailing list for the Cygwin project.
Re: checking for working mmap...no
On Sep 16 14:42, Gerrit P. Haase wrote:
> Am Donnerstag, 16. September 2004 um 10:47 schriebst du:
> > The mmap test is crap. How can an application expect to be able to
> > access just about every address together with MAP_FIXED?
> > Consequentially MapViewOfFileEx returns error 487 in these cases,
> > "Attempt to access invalid address."
> > That's just another example of a crappy autoconf mmap test.
> This means that mmap is actually working? Probably the best option
> would be to fix the test in the upstream sources, so it will just work
> automatically then? Maybe fixing it in the -devel autoconf release
> for now would be sufficient too? Charles?
mmap works fine for a long time already, as long as you work strictly
SUSv3 conformant. The code also tries hard to accomodate usual border
cases (like, say, the expectation that two consecutively mmaped pages
are located adjacent in memory), but code like the one in this thread
is just way off.
The test in question doesn't look like the standard autoconf test btw.,
it looks like a handcrafted one, but I could be wrong.
Dunno what the current autoconf mmap test does, but the original test
back in 2.13 times was as crappy as this one. It malloc'd an area
and expected that it then can mmap it. That won't work on every system
and it certainly doesn't work on Windows. Random use of MAP_FIXED is
just a good way to create non-portable code.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader mailto:firstname.lastname@example.org
Red Hat, Inc.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html