This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Reducing memory consumption
- To: martin at loewis dot home dot cs dot tu-berlin dot de
- Subject: Re: Reducing memory consumption
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Sat, 18 Mar 2000 10:11:25 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <200003181738.SAA31620@loewis.home.cs.tu-berlin.de>
Martin --
>>>>> "Martin" == Martin v Loewis <martin@loewis.home.cs.tu-berlin.de> writes:
Martin> It introduces a new trigger function gcc_collect_rarely,
Martin> which only triggers collection when memory consumption has
Martin> at least doubled; in the beginning, it even needs to
Martin> triple until something is done.
I don't think there's any point in that. Just call the existing
ggc_collect. We already have enough parameters to tweak: the minimum
size at which to do GC, and the expansion factor. There's no real
reason to have a different expansion factor in other situations.
Before we get to the next major release, we need to profile, figure
out why things are slower and bigger, and take appropriate action.
I'll bet that GC is not really the cause of either the slowdown or the
size expansion, but we won't know until we profile, and experiment.
That said, your patch is basically a good idea. Put it in, but
without the new function; just call ggc_collect. Right now, we do our
first collection at rougly 4MB; it might well be that we should set
this to (say) 16MB instead. Ideally, lots of small files, especially
in C, would require no collection at all.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com