From daf8b130c8414c0487ff0c1cdc238d8c05032bf0 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 24 Jan 2012 08:16:14 +0400 Subject: [PATCH] Enable GC_MIN_MARKERS to set minimal number of pthread-based markers * pthread_support.c (GC_thr_init): Allow to specify GC_markers minimum value (by GC_MIN_MARKERS). --- pthread_support.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pthread_support.c b/pthread_support.c index 6d5c314e..5ad3a7de 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -1020,11 +1020,16 @@ GC_INNER void GC_thr_init(void) } } else { GC_markers = GC_nprocs; +# ifdef GC_MIN_MARKERS + /* This is primarily for targets without getenv(). */ + if (GC_markers < GC_MIN_MARKERS) + GC_markers = GC_MIN_MARKERS; +# endif if (GC_markers >= MAX_MARKERS) GC_markers = MAX_MARKERS; /* silently limit GC_markers value */ } } -# endif +# endif } # ifdef PARALLEL_MARK if (GC_print_stats) { -- 2.40.0