public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: okellogg@users.sourceforge.net
Cc: gcc@gcc.gnu.org
Subject: Re: [gnat] stmt_group_free_list and gnu_stack_free_list in trans.c
Date: Fri, 11 Sep 2009 14:50:00 -0000	[thread overview]
Message-ID: <m3tyz9mt71.fsf@google.com> (raw)
In-Reply-To: <1252649625.7094.25.camel@tidbit.site> (Oliver Kellogg's message of "Fri\, 11 Sep 2009 08\:13\:45 +0200")

oliver.kellogg@t-online.de (Oliver Kellogg) writes:

> What is the point of stmt_group_free_list and gnu_stack_free_list in
> trans.c? Why not always allocate a fresh node?

Just for speed, I assume.  It's usually faster to keep a free list than
to go back to the allocator each time.  I don't know anything about the
Ada compiler but I assume it needs to allocate a bunch of stmt_group
structures.

stmt_group_free_list is marked deletable which means that if a garbage
collection occurs the memory taken up by the free list will be freed.

Ian

      reply	other threads:[~2009-09-11 14:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-11  6:06 Oliver Kellogg
2009-09-11 14:50 ` Ian Lance Taylor [this message]

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=m3tyz9mt71.fsf@google.com \
    --to=iant@google.com \
    --cc=gcc@gcc.gnu.org \
    --cc=okellogg@users.sourceforge.net \
    /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).