[gnat] stmt_group_free_list and gnu_stack_free_list in trans.c
Ian Lance Taylor
iant@google.com
Fri Sep 11 14:50:00 GMT 2009
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
More information about the Gcc
mailing list