From fdb65533471e8e8304558f46d1a2adbc0cc0b508 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 9 Apr 2019 09:38:44 +0300 Subject: [PATCH] Enable sbrk-to-mmap fallback on major supported Unix-like platforms 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index cb54ef79..4820601a 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -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 -- 2.50.1