Enable sbrk-to-mmap fallback on major supported Unix-like platforms
authorIvan Maidanski <ivmai@mail.ru>
Tue, 9 Apr 2019 06:38:44 +0000 (09:38 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 9 Apr 2019 06:38:44 +0000 (09:38 +0300)
This only affects --disable-munmap configuration.

* include/private/gcconfig.h [CYGWIN32 || DARWIN || HAIKU || NETBSD
|| OPENBSD] (MMAP_SUPPORTED): Define macro; add comment.

include/private/gcconfig.h

index cb54ef7..4820601 100644 (file)
@@ -3102,8 +3102,11 @@ EXTERN_C_BEGIN
 # undef USE_MMAP
 #endif
 
-#if defined(LINUX) || defined(FREEBSD) || defined(SOLARIS) || defined(IRIX5) \
+#if defined(CYGWIN32) || defined(DARWIN) || defined(FREEBSD) \
+    || defined(HAIKU) || defined(IRIX5) || defined(LINUX) || defined(NETBSD) \
+    || defined(OPENBSD) || defined(SOLARIS) \
     || ((defined(USE_MMAP) || defined(USE_MUNMAP)) && !defined(USE_WINALLOC))
+  /* Try both sbrk and mmap, in that order.     */
 # define MMAP_SUPPORTED
 #endif