This page was produced by an automated import process, and may have formatting errors; feel free to fix.
Memory Management for Symbol Files
Most memory associated with a loaded symbol file is stored on its objfile_obstack. This includes symbols, types, namespace data, and other information produced by the symbol readers.
Because this data lives on the objfile’s obstack, it is automatically released when the objfile is unloaded or reloaded. Therefore one objfile must not reference symbol or type data from another objfile; they could be unloaded at different times.
User convenience variables, et cetera, have associated types. Normally these types live in the associated objfile. However, when the objfile is unloaded, those types are deep copied to global memory, so that the values of the user variables and history items are not lost.