This is the mail archive of the gcc@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]

Re: Collecting more frequently


> 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.

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