bug-gnulib
[Top][All Lists]
Advanced

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

mmapping of /dev/zero always fails on darwin


From: Peter O'Gorman
Subject: mmapping of /dev/zero always fails on darwin
Date: Fri, 09 Sep 2005 23:47:54 +0900
User-agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317)

Hi,
I just tried to use cvs-1.12.12 on Mac OS X, and it always dies. I traced the problem to pagealign_alloc.c, which attempts to mmap /dev/zero.
<http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/gnulib/gnulib/lib/pagealign_alloc.c?rev=HEAD&content-type=text/x-csrc>

As you can see from this little snippet of gcc configure, you can't mmap /dev/zero on darwin.

   AC_CACHE_CHECK([whether mmap from /dev/zero works],
  gcc_cv_func_mmap_dev_zero,
  [# Add a system to this blacklist if it has mmap() but /dev/zero
   # does not exist, or if mmapping /dev/zero does not give anonymous
   # zeroed pages with both the following properties:
   # 1. If you map N consecutive pages in with one call, and then
   #    unmap any subset of those pages, the pages that were not
   #    explicitly unmapped remain accessible.
   # 2. If you map two adjacent blocks of memory and then unmap them
   #    both at once, they must both go away.
   # Systems known to be in this category are Windows (all variants),
   # VMS, and Darwin.
   case "$host_os" in
     vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
        gcc_cv_func_mmap_dev_zero=no ;;
     *)
        gcc_cv_func_mmap_dev_zero=yes;;
   esac])

Thanks,
Peter




reply via email to

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