From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 910 invoked by alias); 18 May 2009 21:27:38 -0000 Received: (qmail 901 invoked by uid 22791); 18 May 2009 21:27:37 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 May 2009 21:27:29 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4ILROHN028423; Mon, 18 May 2009 17:27:24 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4ILRNMp030936; Mon, 18 May 2009 17:27:23 -0400 Received: from opsy.redhat.com (vpn-12-127.rdu.redhat.com [10.11.12.127]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4ILRMCt022664; Mon, 18 May 2009 17:27:22 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 1624C3784BC; Mon, 18 May 2009 15:27:22 -0600 (MDT) To: ppluzhnikov@google.com (Paul Pluzhnikov) Cc: gdb-patches@sourceware.org Subject: Re: [patch] Eliminate quadratic slow-down on number of soilibs (part 2). References: <20090501221639.4FF8A19C4E1@localhost> From: Tom Tromey Reply-To: tromey@redhat.com Date: Mon, 18 May 2009 21:27:00 -0000 In-Reply-To: <20090501221639.4FF8A19C4E1@localhost> (Paul Pluzhnikov's message of "Fri\, 1 May 2009 15\:16\:39 -0700 \(PDT\)") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-05/txt/msg00374.txt.bz2 >>>>> "Paul" == Paul Pluzhnikov writes: Paul> + { Paul> + objc_csym = xmalloc (sizeof (*objc_csym)); Paul> + *objc_csym = objfile_csym; Paul> + set_objfile_data (objfile, objc_objfile_data, objc_csym); Paul> + } [...] Paul> +void Paul> +_initialize_objc_lang (void) Paul> +{ Paul> + objc_objfile_data = register_objfile_data (); Paul> +} I think this should probably call register_objfile_data_with_cleanup, so that the per-objfile data can be freed when the objfile is destroyed. Tom