From 5e60899d8efd66e6799fb52ee47125bd59e6be97 Mon Sep 17 00:00:00 2001 From: theraven Date: Thu, 26 May 2011 14:28:47 +0000 Subject: [PATCH] Allow tweaking GC info dump on exit from an environment variable. --- gc_boehm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gc_boehm.c b/gc_boehm.c index b705c92..47e47fb 100644 --- a/gc_boehm.c +++ b/gc_boehm.c @@ -448,7 +448,10 @@ static void init(void) { GC_INIT(); // Dump GC stats on exit - uncomment when debugging. - //atexit(GC_dump); + if (getenv("LIBOBJC_DUMP_GC_STATUS_ON_EXIT")) + { + atexit(GC_dump); + } refcounts = refcount_create(4096); GC_clear_roots(); }