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]
Other format: [Raw text]

Re: [gnat] stmt_group_free_list and gnu_stack_free_list in trans.c


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


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