[commit: ghc] master: disable large address space on OpenBSD (bc7cc25)

git at git.haskell.org git at git.haskell.org
Sat Oct 31 22:25:16 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/bc7cc25676a8edd7be8cab30d4f26b3dd064f717/ghc

>---------------------------------------------------------------

commit bc7cc25676a8edd7be8cab30d4f26b3dd064f717
Author: Karel Gardas <karel.gardas at centrum.cz>
Date:   Sat Oct 31 23:16:53 2015 +0100

    disable large address space on OpenBSD
    
    Summary:
    This patch disables large address space on OpenBSD. The motivation
    for this is that OpenBSD does not support MAP_NORESERVE. The flag is supported
    only for source code compatibility reasons but is otherwise completely ignored
    by the OS and its mmap syscall.
    
    Reviewers: austin, bgamari
    
    Subscribers: thomie, erikd
    
    Differential Revision: https://phabricator.haskell.org/D1411


>---------------------------------------------------------------

bc7cc25676a8edd7be8cab30d4f26b3dd064f717
 configure.ac | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/configure.ac b/configure.ac
index 65e5d77..bc18c12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1046,6 +1046,11 @@ if test "$ac_cv_sizeof_void_p" -eq 8 ; then
     if test "x$EnableLargeAddressSpace" = "xyes" ; then
         if test "$ghc_host_os" = "darwin" ; then
             use_large_address_space=yes
+	elif test "$ghc_host_os" = "openbsd" ; then
+	    # as of OpenBSD 5.8 (2015), OpenBSD does not support mmap with MAP_NORESERVE.
+	    # The flag MAP_NORESERVE is supported for source compatibility reasons,
+	    # but is completely ignored by OS mmap
+            use_large_address_space=no
         else
             AC_CHECK_DECLS([MAP_NORESERVE, MADV_FREE, MADV_DONTNEED],[],[],
                 [



More information about the ghc-commits mailing list