From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14902 invoked by alias); 12 Jul 2011 21:37:40 -0000 Received: (qmail 14894 invoked by uid 22791); 12 Jul 2011 21:37:39 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,TW_GT,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Jul 2011 21:37:22 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6CLbMXo019736 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 12 Jul 2011 17:37:22 -0400 Received: from host1.jankratochvil.net ([10.3.113.13]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6CLbKOV007829 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Jul 2011 17:37:21 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p6CLbJpA007122; Tue, 12 Jul 2011 23:37:19 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p6CLbIIJ007121; Tue, 12 Jul 2011 23:37:18 +0200 Date: Tue, 12 Jul 2011 22:51:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: Sterling Augustine , gdb-patches@sourceware.org Subject: Re: [commit] Re: [dwarf2_mark_helper patch] Re: [PATCH] Make interrupting tab-completion safe. Message-ID: <20110712213718.GA6359@host1.jankratochvil.net> References: <20110612121158.GA10611@host1.jankratochvil.net> <20110711185334.GA10138@host1.jankratochvil.net> <20110712111440.GA21949@host1.jankratochvil.net> <20110712211447.GA925@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00331.txt.bz2 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