summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2020-04-06 13:35:23 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-25 03:54:37 -0400
commit03a708ba8e8c323b07d8d2e0115d6eb59987cc02 (patch)
treef15859999eaf961053fbeacc044e993b8e8a38d8 /configure.ac
parenta1f34d37b47826e86343e368a5c00f1a4b1f2bce (diff)
downloadhaskell-03a708ba8e8c323b07d8d2e0115d6eb59987cc02.tar.gz
Enable large address space optimization on windows.
Starting with Win 8.1/Server 2012 windows no longer preallocates page tables for reserverd memory eagerly, which prevented us from using this approach in the past. We also try to allocate the heap high in the memory space. Hopefully this makes it easier to allocate things in the low 4GB of memory that need to be there. Like jump islands for the linker.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 9 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 84880d8cb4..070f7ce56c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1219,11 +1219,15 @@ 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
+ 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
+ elif test "$ghc_host_os" = "mingw32" ; then
+ # as of Windows 8.1/Server 2012 windows does no longer allocate the page
+ # tabe for reserved memory eagerly. So we are now free to use LAS there too.
+ use_large_address_space=yes
else
AC_CHECK_DECLS([MAP_NORESERVE, MADV_FREE, MADV_DONTNEED],[],[],
[