|
GCC Middle and Back End API Reference
|

Go to the source code of this file.
Data Structures | |
| struct | ggc_statistics |
|
extern |
Notice that the pointer has been freed.
References ggc_free_overhead(), and ggc_mem_desc().
Referenced by ggc_free(), ggc_free_overhead(), and ggc_record_overhead().
|
extern |
Return the number of bytes allocated at the indicated address.
Return the size of the gc-able object P.
References ggc_get_size(), lookup_page_table_entry(), OBJECT_SIZE, and page_entry::order.
Referenced by ggc_get_size(), ggc_realloc(), ggc_record_overhead(), and gt_pch_note_object().
|
extern |
Garbage collection for the GNU compiler. Internal definitions for ggc-*.c and stringpool.cc. Copyright (C) 2009-2026 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Call ggc_set_mark on all the roots.
Iterate through all registered roots and mark each element.
References ggc_root_tab::base, extra_root_vec, FOR_EACH_VEC_ELT, ggc_mark_root_tab(), ggc_mark_roots(), ggc_mark_stringpool(), ggc_protect_identifiers, ggc_purge_stringpool(), gt_clear_caches(), gt_ggc_deletable_rtab, gt_ggc_rtab, i, invoke_plugin_callbacks(), ggc_root_tab::nelt, NULL, and ggc_root_tab::stride.
Referenced by ggc_collect(), and ggc_mark_roots().
|
extern |
Stringpool.
Mark the entries in the string pool.
Mark the trees hanging off the identifier node for GGC. These are handled specially (not using gengtype) because identifiers are only roots during one part of compilation.
References ggc_mark_stringpool(), ident_hash, ident_hash_extra, mark_ident(), and NULL.
Referenced by ggc_mark_roots(), and ggc_mark_stringpool().
|
extern |
Assuming that the objects really do end up at the address passed to ggc_pch_this_base, return the address of this object.
References ggc_pch_data::d, ggc_pch_alloc_object(), NUM_SIZE_LOOKUP, OBJECT_SIZE, and size_lookup.
Referenced by ggc_call_alloc(), and ggc_pch_alloc_object().
|
extern |
The second parameter and third parameters give the address and size of an object. Update the ggc_pch_data structure with as much of that information as is necessary.
References ggc_pch_data::d, ggc_pch_count_object(), NUM_SIZE_LOOKUP, OBJECT_SIZE, size_lookup, and ggc_pch_ondisk::totals.
Referenced by ggc_call_count(), and ggc_pch_count_object().
|
extern |
All objects have been written, write out any final information required.
References ggc_pch_data::d, fatal_error(), free(), ggc_pch_finish(), and input_location.
Referenced by ggc_pch_finish(), and gt_pch_save().
|
extern |
Write out any initial information required.
References ggc_pch_prepare_write().
Referenced by ggc_pch_prepare_write(), and gt_pch_save().
|
extern |
A PCH file has just been read in at the address specified second parameter. Set up the GC implementation for the new objects.
References ggc_globals::allocated, ggc_globals::allocated_last_gc, BITMAP_SIZE, ggc_globals::by_depth_in_use, page_entry::bytes, clear_marks(), ggc_globals::context_depth, page_entry::context_depth, fatal_error(), ggc_globals::finalizers, find_free_list(), page_entry::free_list, G, gcc_assert, ggc_pch_read(), HOST_BITS_PER_LONG, i, page_entry::in_use_p, input_location, move_ptes_to_front(), page_entry::next, NULL, page_entry::num_free_objects, NUM_ORDERS, OBJECT_SIZE, page_entry::order, page_entry::page, PAGE_ALIGN, ggc_globals::page_tails, ggc_globals::pages, ggc_globals::pagesize, poison_pages, push_by_depth(), set_page_table_entry(), ggc_pch_ondisk::totals, validate_free_objects, ggc_globals::vec_finalizers, and vNULL.
Referenced by ggc_pch_read(), and gt_pch_restore().
|
extern |
The objects, when read, will most likely be at the address in the second parameter.
References a, ggc_pch_data::base, ggc_pch_data::d, ggc_pch_this_base(), i, NUM_ORDERS, OBJECT_SIZE, PAGE_ALIGN, and ggc_pch_ondisk::totals.
Referenced by ggc_pch_this_base(), and gt_pch_save().
|
extern |
Return the total size of the data to be written to hold all the objects previously passed to ggc_pch_count_object.
References a, ggc_pch_data::d, ggc_pch_total_size(), i, NUM_ORDERS, OBJECT_SIZE, PAGE_ALIGN, and ggc_pch_ondisk::totals.
Referenced by ggc_pch_total_size(), and gt_pch_save().
|
extern |
Write out this object, including any padding.
References ggc_pch_data::d, fatal_error(), G, ggc_pch_write_object(), input_location, NUM_SIZE_LOOKUP, OBJECT_SIZE, ggc_globals::pagesize, ROUND_UP_VALUE, SEEK_CUR, size_lookup, and ggc_pch_ondisk::totals.
Referenced by ggc_pch_write_object(), and gt_pch_save().
|
extern |
Used by the various collectors to gather and print statistics that do not depend on the collector in use.
References ggc_print_common_statistics(), ggc_stats, and NULL.
Referenced by ggc_print_common_statistics(), and ggc_print_statistics().
|
extern |
After live values has been marked, walk all recorded pointers and see if they are still live.
References ggc_marked_p(), ggc_mem_desc(), and ggc_prune_overhead_list().
Referenced by ggc_collect(), ggc_prune_overhead_list(), and ggc_record_overhead().
|
extern |
Purge the entries in the string pool.
Purge the identifier hash of identifiers which are no longer referenced.
References ggc_marked_p(), ggc_purge_stringpool(), ident_hash, ident_hash_extra, maybe_delete_ident(), and NULL.
Referenced by ggc_mark_roots(), and ggc_purge_stringpool().
|
extern |
Allocation and collection.
References FINAL_MEM_STAT_DECL, ggc_free_overhead(), ggc_get_size(), ggc_prune_overhead_list(), and ggc_record_overhead().
|
extern |
Return the stringpool to its state before gt_pch_save_stringpool was called.
Referenced by gt_pch_save().
|
extern |
PCH and GGC handling for strings, mostly trivial.
Pointer-walking routine for strings (not very interesting, since strings don't contain pointers).
References gcc_unreachable, and gt_pch_p_S().
Referenced by gt_pch_n_S(), gt_pch_n_S2(), gt_pch_note_object(), gt_pch_note_reorder(), gt_pch_p_S(), and gt_pch_save().
|
extern |
A PCH file has been restored, which loaded SPD; fill the real hash table from SPD.
Referenced by gt_pch_restore().
|
extern |
Save and restore the string pool entries for PCH.
Save the stringpool data in SPD.
References string_pool_data::entries, string_pool_data_extra::entries, ggc_alloc(), ggc_vec_alloc(), gt_pch_save_stringpool(), GTY, ident_hash, ident_hash_extra, string_pool_data::nelements, string_pool_data_extra::nelements, string_pool_data::nslots, string_pool_data_extra::nslots, spd, and spd2.
Referenced by gt_pch_save(), and gt_pch_save_stringpool().
|
extern |
Return a new ggc_pch_data structure.
References init_ggc_pch().
Referenced by gt_pch_save(), and init_ggc_pch().