autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: detecting mmap?


From: Paul Eggert
Subject: Re: detecting mmap?
Date: Fri, 19 Jul 2002 11:02:09 -0700 (PDT)

> Date: Fri, 19 Jul 2002 10:20:18 -0700
> From: "Donn Terry" <address@hidden>

> (I like having a single MMAP test emit multiple flags; that would
> make it much easier for applications to simply change to test for
> what they need.)

Yes, that would be nice, if someone would write up a patch that took
all the previous comments into mind.

> There are different uses, and the "minimal" case is actually quite
> useful.

The minimal case is already supported: AC_CHECK_FUNCS(mmap).  I've
seen it used.

> Date: Fri, 19 Jul 2002 08:12:46 -0700
> From: "Donn Terry" <address@hidden>
> 
> I haven't looked at gnu grep, but it's worth asking why the mmap()ed
> region couldn't be just as easily elsewhere.

Because it would be more of a pain in practice to port code that
mmapped /dev/zero and then remapped it, than code that invoked malloc
and remapped it.  mmapping /dev/zero is not supported by POSIX either,
whereas malloc is, and in practice malloc is more portable.

There may be weird systems out there that don't let you mmap the
result of malloc.  Too bad: they break several applications, for no
good reason that I can see.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]