This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: hpux 10.20 and mmap everywhere


On Fri, Jul 07, 2000 at 02:53:19PM -0400, John David Anglin wrote:
> I think what is needed is a MMAP_ANONYMOUS test.

No, just extend the HAVE_MMAP_ANYWHERE test.  All that test is
trying to find out is if we can get zeroed pages anywhere in the
address space.

Something like

#if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
#define MAP_ANONYMOUS MAP_ANON
#endif
...
#ifdef MAP_ANONYMOUS
  fd = -1;
#else
  fd = open("/dev/zero", O_RDWR);
  if (fd < 0)
    exit(1);
#endif

ggc-page.c already does something like this.  I'm surprised
that the autoconf test doesn't.


r~

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