forked from Imagelibrary/binutils-gdb
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user