[prev in list] [next in list] [prev in thread] [next in thread] 

List:       autoconf
Subject:    Re: detecting mmap?
From:       Paul Eggert <eggert () twinsun ! com>
Date:       2002-07-19 18:02:09
Message-ID: 200207191802.g6JI29F07790 () sic ! twinsun ! com
[Download RAW message or body]

> Date: Fri, 19 Jul 2002 10:20:18 -0700
> From: "Donn Terry" <donnte@microsoft.com>

> (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" <donnte@microsoft.com>
> 
> 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.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic