Don't obstack-allocate the call site hash table

The call site hash table is the last hash table using obstack
allocation.  In one large (non-public) test case, these hash tables
take a substiantial amount of memory.  Some of this memory is wasted
-- whenever the hash table is resized, the old table is not freed.

This patch fixes the problem by changing this hash table to be
heap-allocated.  This means that resizing will no longer "leak"
memory.
This commit is contained in:
Tom Tromey
2024-06-05 09:38:53 -06:00
parent f59be2ed39
commit 4122e647d5
5 changed files with 28 additions and 11 deletions

View File

@@ -530,6 +530,8 @@ objfile::~objfile ()
/* It still may reference data modules have associated with the objfile and
the symbol file data. */
forget_cached_source_info ();
for (compunit_symtab *cu : compunits ())
cu->finalize ();
breakpoint_free_objfile (this);
btrace_free_objfile (this);