]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Don't obstack-allocate the call site hash table
authorTom Tromey <tromey@adacore.com>
Wed, 5 Jun 2024 15:38:53 +0000 (09:38 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 24 Jun 2024 15:11:30 +0000 (09:11 -0600)
commit4122e647d571b35b4aba73ec481bc2d72d193e54
tree7b374b0fc15acefc01f99a3fd754fa1feaf72174
parentf59be2ed3946b69a969c65dd7093b4e865bba003
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.
gdb/dwarf2/cu.h
gdb/dwarf2/read.c
gdb/objfiles.c
gdb/symtab.c
gdb/symtab.h