Both GWW- and mprotect-based implementations should work. The first one
works only if the collector is compiled with -D USE_WINALLOC passed to
CFLAGS.
* include/private/gcconfig.h [(I386 || X86_64) && CYGWIN32]
(MPROTECT_VDB): Define.
* include/private/gcconfig.h [(I386 || X86_64) && CYGWIN32
&& USE_WINALLOC] (GWW_VDB): Define.
* include/private/gcconfig.h [(I386 || X86_64) && CYGWIN32 && USE_MMAP]
(NEED_FIND_LIMIT, USE_MMAP_ANON): Do not define if USE_WINALLOC.
* include/private/gcconfig.h [GWW_VDB && !USE_WINALLOC && !CPPCHECK]:
Produce an invalid config error.
# define OS_TYPE "CYGWIN32"
# define DATASTART ((ptr_t)GC_DATASTART) /* From gc.h */
# define DATAEND ((ptr_t)GC_DATAEND)
-# ifdef USE_MMAP
+# define MPROTECT_VDB
+# ifdef USE_WINALLOC
+# define GWW_VDB
+# elif defined(USE_MMAP)
# define NEED_FIND_LIMIT
# define USE_MMAP_ANON
# endif
# endif
# ifdef CYGWIN32
# define OS_TYPE "CYGWIN32"
-# ifdef USE_MMAP
+# define MPROTECT_VDB
+# ifdef USE_WINALLOC
+# define GWW_VDB
+# elif defined(USE_MMAP)
# define USE_MMAP_ANON
# endif
# endif
# error Invalid config: PARALLEL_MARK requires GC_THREADS
#endif
+#if defined(GWW_VDB) && !defined(USE_WINALLOC) && !defined(CPPCHECK)
+# error Invalid config: GWW_VDB requires USE_WINALLOC
+#endif
+
#if (((defined(MSWIN32) || defined(MSWINCE)) && !defined(__GNUC__)) \
|| (defined(MSWIN32) && defined(I386)) /* for Win98 */ \
|| (defined(USE_PROC_FOR_LIBRARIES) && defined(THREADS))) \