From eba1b56bd21615f479e613c1ff36fe4576bcc683 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sat, 9 Jun 2012 22:13:53 +0400 Subject: [PATCH] Recognize GC_DONT_GC macro in gc.h (causes GC_INIT to turn off GC) * include/gc.h (GC_INIT_CONF_MAX_RETRIES): Recognize GC_DONT_GC (set GC_dont_gc to 1 in that case) to turn off GC at start-up (for a debugging purpose). --- include/gc.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/gc.h b/include/gc.h index d2e13d5..f9405bb 100644 --- a/include/gc.h +++ b/include/gc.h @@ -1503,7 +1503,11 @@ GC_API int GC_CALL GC_get_force_unmap_on_gcollect(void); # define GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT /* empty */ #endif -#ifdef GC_MAX_RETRIES +#ifdef GC_DONT_GC + /* This is for debugging only (useful if environment variables are */ + /* unsupported); cannot call GC_disable as goes before GC_init. */ +# define GC_INIT_CONF_MAX_RETRIES (void)(GC_dont_gc = 1) +#elif defined(GC_MAX_RETRIES) /* Set GC_max_retries to the desired value at start-up */ # define GC_INIT_CONF_MAX_RETRIES GC_set_max_retries(GC_MAX_RETRIES) #else -- 2.7.4