diff --git a/src/coreclr/gc/gcpriv.h b/src/coreclr/gc/gcpriv.h index 519597c38ea9e0..8ec1f84c72fe5b 100644 --- a/src/coreclr/gc/gcpriv.h +++ b/src/coreclr/gc/gcpriv.h @@ -140,13 +140,15 @@ inline void FATAL_GC_ERROR() // // This means any empty regions can be freely used for any generation. For // Server GC we will balance regions between heaps. -// For now disable regions for standalone GC and macOS builds +// For now disable regions for standalone GC builds // For SunOS or illumos this is temporary, until we can add MAP_PRIVATE // to the mmap() calls in unix/gcenv.unix.cpp More details here: // https://github.com/dotnet/runtime/issues/104211 -#if defined (HOST_64BIT) && !defined (BUILD_AS_STANDALONE) && !defined(__APPLE__) && !defined(__sun) +// Apple non-macOS platforms (such as iOS, tvOS, and Mac Catalyst) disallow +// the large virtual address space reservations that GC regions require. +#if defined (HOST_64BIT) && !defined (BUILD_AS_STANDALONE) && !defined(__sun) && (!defined(HOST_APPLE) || defined(HOST_OSX)) #define USE_REGIONS -#endif //HOST_64BIT && BUILD_AS_STANDALONE && !__APPLE__ +#endif //HOST_64BIT && !BUILD_AS_STANDALONE && !__sun && (!HOST_APPLE || HOST_OSX) //#define SPINLOCK_HISTORY //#define RECORD_LOH_STATE