From 1e1b58ca8e9c8abf91d68c1335f6c03e869e3771 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 12 Apr 2019 20:25:47 +0300 Subject: [PATCH] Allow GC_PAUSE_TIME_TARGET environment variable values smaller than 5 ms All time limit values starting from 1 ms are now accepted. * misc.c [!GC_DISABLE_INCREMENTAL] (GC_init): Do not set GC_time_limit if NO_CLOCK; allow all non-zero time_limit values (instead of >4); do not call WARN() if time_limit value is incorrect. --- misc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/misc.c b/misc.c index 4f3284b..30ce3c2 100644 --- a/misc.c +++ b/misc.c @@ -1091,15 +1091,12 @@ GC_API void GC_CALL GC_init(void) } } # endif -# ifndef GC_DISABLE_INCREMENTAL +# if !defined(GC_DISABLE_INCREMENTAL) && !defined(NO_CLOCK) { char * time_limit_string = GETENV("GC_PAUSE_TIME_TARGET"); if (0 != time_limit_string) { long time_limit = atol(time_limit_string); - if (time_limit < 5) { - WARN("GC_PAUSE_TIME_TARGET environment variable value too small " - "or bad syntax: Ignoring\n", 0); - } else { + if (time_limit > 0) { GC_time_limit = time_limit; } } -- 2.7.4