This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Collecting more frequently
- To: Mike Stump <mrs at windriver dot com>
- Subject: Re: Collecting more frequently
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Sat, 18 Mar 2000 01:13:45 +0000 (GMT)
- CC: gcc at gcc dot gnu dot org, martin at loewis dot home dot cs dot tu-berlin dot de, mark at codesourcery dot com
> If you want an easy way to make your change more reasonable, without
> do any real work, you can just collect less often: { static int i; if
> (++i % 20 == 19) gc_collect(); }. Then you just have to find a
> reasonable N. Simple, but better than blowing out memory by not
> collecting.
I would rather prefer an heuristic that looks at the ratio of new
memory allocated to total memory allocated.