Special-case tree_decl/tree_list allocations.
authorMark Mitchell <mark@codesourcery.com>
Thu, 4 Jan 2001 21:18:27 +0000 (21:18 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 4 Jan 2001 21:18:27 +0000 (21:18 +0000)
commit2be510b87745ef8f57b584fdff4a2805783b3de7
tree449a4a48f0fb3f1a7b657d6c17abb75165423bb4
parentbf1aaf0ac6dc0ea6019b0181211c2f0316526aec
Special-case tree_decl/tree_list allocations.

* ggc-page.c (OBJECT_PER_PAGE): Reimplement.
(OBJECT_SIZE): New macro.
(NUM_EXTRA_ORDER): Likewise.
(extra_order_size_table): New variable.
(NUM_ORDERS): New macro.
(objects_per_page_table): New variable.
(object_size_table): New variable.
(G.pages): Use NUM_ORDERS to bound the array.
(G.page_tails): Likewise.
(DIV_ROUND_UP): Remove.
(BITMAP_SIZE): Use CEIL, instead of DIV_ROUND_UP.
(alloc_page): Use OBJECT_SIZE.
(size_lookup): Don't make it const.
(ggc_alloc): Use OBJECT_SIZE.
(ggc_set_mark): Likewise.
(ggc_get_size): Likewise.
(init_ggc): Set up the object_size_table, objects_per_page_table,
and adjust size_lookup.
(ggc_recalculate_in_use_p): Use CEIL, not DIV_ROUND_UP.
(ggc_pop_context): Use NUM_ORDERS.
(clear_marks): Likewise.
(sweep_pages): Likewise.
(poison_pages): Likewise.
(ggc_print_statistics): Use OBJECT_SIZE.

From-SVN: r38692
gcc/ChangeLog
gcc/ggc-page.c