public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mike Stump <mrs@windriver.com>
To: gcc@gcc.gnu.org, martin@loewis.home.cs.tu-berlin.de
Cc: mark@codesourcery.com
Subject: Re: Collecting more frequently
Date: Fri, 17 Mar 2000 15:49:00 -0000	[thread overview]
Message-ID: <200003172349.PAA24733@kankakee.wrs.com> (raw)

> Date: Sat, 18 Mar 2000 00:06:00 +0100
> From: "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>

> You'll notice that peak memory consumption is much lower now, and
> that time spent in collection is higher.

> I propose that garbage collection happens more frequently in the
> 'parsing' stage of input file processing. Calling it as often as
> above is perhaps not reasonable, since there is not that much new
> garbage every time. So instead, I propose that the threshold is
> higher, e.g. collection should occur after each extdef only when the
> memory consumption has doubled or tripled since the last collection.

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.

If your adventuresome, then a scheme that finds out how close the
machine is to paging, and then collecting on demand might be the most
optimal scheme, but this is far from portable and does introduce some
non-repeatability into the compiler that some us us would hate to see
go.

Anyway, sounds like your on the right track.

             reply	other threads:[~2000-03-17 15:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-17 15:49 Mike Stump [this message]
2000-03-17 17:14 ` Joern Rennecke
2000-03-17 17:27   ` Mark Mitchell
2000-03-20  7:28     ` Joern Rennecke
2000-03-20  9:23       ` Mark Mitchell
2000-03-20 14:18       ` Martin v. Loewis
2000-03-20 10:08 ` Jeffrey A Law
2000-03-20 10:37   ` Michael Meissner
2000-03-21 19:07   ` Joe Buck
  -- strict thread matches above, loose matches on Subject: below --
2000-03-17 15:13 Martin v. Loewis
2000-03-18  5:25 ` Gerald Pfeifer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200003172349.PAA24733@kankakee.wrs.com \
    --to=mrs@windriver.com \
    --cc=gcc@gcc.gnu.org \
    --cc=mark@codesourcery.com \
    --cc=martin@loewis.home.cs.tu-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).