Bug 14108 - symbase in elf_slurp_symbol_table memory waste
Summary: symbase in elf_slurp_symbol_table memory waste
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: symtab (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2012-05-14 17:05 UTC by dje
Modified: 2012-05-14 17:05 UTC (History)
0 users

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description dje 2012-05-14 17:05:06 UTC
It is not possible for the caller of bfd_canonicalize_symtab to free the "symbase" object allocated by elf_slurp_symbol_table (bfd/elfcode.h).

The memory isn't wasted per se, it will be freed when the bfd is freed.
However, GDB has no need to keep it (at least for normal syms, there's a comment in gdb/elfread.c about needing to keep dynamic syms, not sure it's still valid or if it applies here).  In large apps it can be a significant waste of memory (e.g. 100's of MB).