This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [commit] Re: [dwarf2_mark_helper patch] Re: [PATCH] Make interrupting tab-completion safe.


On Tue, 12 Jul 2011 23:18:16 +0200, Tom Tromey wrote:
> QUITs in symtab reading imply resource leaks; however there are already
> known resource leaks in this code (Jan has details).

Besides small leaks here and there (such as allocating CU objects from
objfile_obstack - objfile_obstack has objfile lifetime, comp_unit_obstack has
CU lifetime; CU can get loaded+freed multiple times for one objfile).

There is also a more general problem that symtab can be read once and symtab
can never be freed.  This means that with tbreak or batch control of GDB etc.
in fact `-readnow' gets into effect which costs on libwekitgtk 5GB of memory
and it would be larger on real world apps.  It is a subpart of PR 12828 filed
by me.


> My belief is that we should move away from obstack allocation here and to
> something more fine-grained like an alloc pool.

There should be at least symtab_obstack.  But obstack is not great in general
as it is incompatible with valgrind.


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]