public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [gnat] stmt_group_free_list and gnu_stack_free_list in trans.c
@ 2009-09-11  6:06 Oliver Kellogg
  2009-09-11 14:50 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Kellogg @ 2009-09-11  6:06 UTC (permalink / raw)
  To: gcc

Hello,

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

Thanks,

Oliver


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gnat] stmt_group_free_list and gnu_stack_free_list in trans.c
  2009-09-11  6:06 [gnat] stmt_group_free_list and gnu_stack_free_list in trans.c Oliver Kellogg
@ 2009-09-11 14:50 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2009-09-11 14:50 UTC (permalink / raw)
  To: okellogg; +Cc: gcc

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-11 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11  6:06 [gnat] stmt_group_free_list and gnu_stack_free_list in trans.c Oliver Kellogg
2009-09-11 14:50 ` Ian Lance Taylor

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