This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fix c++ gc problems following t_r_o_c


 > On Wed, Sep 03, 2003 at 04:27:28PM -0700, Geoff Keating wrote:
 > > Maybe we should have a 'gcsc', GC Sometimes Collect, which can be on
 > > by default in enable-checking builds and doesn't cost quite so much as
 > > gcac.
 > 
 > That'd be nice.
 > r~

I don't know that we need a separate setting.  If you can live without
it the following patch should do the trick.  The patch causes GCC to
default to the gcc-3.2.x collection values (i.e. 30% min-expand and
4Mb min-heap) when 'gc' checking is enabled, and this setting is
already "on" by default on mainline.

		--Kaveh

2003-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* ggc-common.c (init_ggc_heuristics): Don't use the heuristics
	when checking is enabled.

diff -rup orig/egcc-CVS20030903/gcc/ggc-common.c egcc-CVS20030903/gcc/ggc-common.c
--- orig/egcc-CVS20030903/gcc/ggc-common.c	2003-08-22 20:01:11.000000000 -0400
+++ egcc-CVS20030903/gcc/ggc-common.c	2003-09-03 23:49:30.987484619 -0400
@@ -753,7 +753,7 @@ ggc_min_heapsize_heuristic (void)
 void
 init_ggc_heuristics (void)
 {
-#ifndef ENABLE_GC_ALWAYS_COLLECT
+#if !defined ENABLE_GC_CHECKING && !defined ENABLE_GC_ALWAYS_COLLECT
   set_param_value ("ggc-min-expand", ggc_min_expand_heuristic());
   set_param_value ("ggc-min-heapsize", ggc_min_heapsize_heuristic());
 #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]