[commit: ghc] master: Revert "rts: Enable two-step allocator on FreeBSD" (6715373)
git at git.haskell.org
git at git.haskell.org
Fri Jul 6 18:12:30 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/671537364ae09dc65d4bb1c646aa80e9c8f808df/ghc
>---------------------------------------------------------------
commit 671537364ae09dc65d4bb1c646aa80e9c8f808df
Author: Ben Gamari <ben at smart-cactus.org>
Date: Fri Jul 6 14:12:03 2018 -0400
Revert "rts: Enable two-step allocator on FreeBSD"
This reverts commit 8736715857d08cc1f88d766c257b39c05df20639.
I hadn't intended on merging this.
>---------------------------------------------------------------
671537364ae09dc65d4bb1c646aa80e9c8f808df
configure.ac | 17 ++++++++---------
rts/posix/OSMem.c | 11 +++--------
2 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1976530..ac464b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1182,23 +1182,22 @@ 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
+ 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, MAP_GUARD, MADV_FREE, MADV_DONTNEED],[],[],
+ AC_CHECK_DECLS([MAP_NORESERVE, MADV_FREE, MADV_DONTNEED],[],[],
[
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
])
- if ( test "$ac_cv_have_decl_MAP_NORESERVE" = "yes" ||
- test "$ac_cv_have_decl_MAP_GUARD" = "yes" ) &&
- ( test "$ac_cv_have_decl_MADV_FREE" = "yes" ||
- test "$ac_cv_have_decl_MADV_DONTNEED" = "yes" ) ; then
+ if test "$ac_cv_have_decl_MAP_NORESERVE" = "yes" &&
+ test "$ac_cv_have_decl_MADV_FREE" = "yes" ||
+ test "$ac_cv_have_decl_MADV_DONTNEED" = "yes" ; then
use_large_address_space=yes
fi
fi
diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
index 08f9635..e63e798 100644
--- a/rts/posix/OSMem.c
+++ b/rts/posix/OSMem.c
@@ -102,10 +102,8 @@ void osMemInit(void)
The naming is chosen from the Win32 API (VirtualAlloc) which does the
same thing and has done so forever, while support for this in Unix systems
has only been added recently and is hidden in the posix portability mess.
- The Linux manpage suggests that mmap must be passed MAP_NORESERVE in order
- to get reservation-only behavior. It is confusing because to get the reserve
- behavior we need MAP_NORESERVE (which tells the kernel not to allocate backing
- space), but heh...
+ It is confusing because to get the reserve behavior we need MAP_NORESERVE
+ (which tells the kernel not to allocate backing space), but heh...
*/
enum
{
@@ -163,10 +161,7 @@ my_mmap (void *addr, W_ size, int operation)
else
prot = PROT_NONE;
if (operation == MEM_RESERVE)
-# if defined(MAP_GUARD)
- // Provided by FreeBSD
- flags = MAP_GUARD;
-# elif defined(MAP_NORESERVE)
+# if defined(MAP_NORESERVE)
flags = MAP_NORESERVE;
# else
# if defined(USE_LARGE_ADDRESS_SPACE)
More information about the ghc-commits
mailing list