This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Make GC tuning parameters adjustable at runtime
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 10 Nov 2002 21:30:20 -0800
- Subject: Re: Make GC tuning parameters adjustable at runtime
#ifndef GGC_ALWAYS_COLLECT
if (G.allocated < GGC_MIN_EXPAND_FOR_GC * G.allocated_last_gc)
return;
#endif
where GGC_MIN_EXPAND_FOR_GC is a #define for the floating point
constant 1.3.
After:
size_t allocated_last_gc =
MAX (G.allocated_last_gc, (size_t)PARAM_VALUE (GGC_MIN_HEAPSIZE) *
1024);
size_t min_expand = allocated_last_gc * PARAM_VALUE (GGC_MIN_EXPAND) /
100;
if (G.allocated < allocated_last_gc + min_expand)
return;
That should be fine; as long as we're not changing stuff in the
per-object mark path, we're OK.
The patch is fine; check it in. Thanks!
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com