From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23973 invoked by alias); 12 Aug 2003 20:08:57 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 23913 invoked from network); 12 Aug 2003 20:08:41 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 12 Aug 2003 20:08:41 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 24EFB2B7F; Tue, 12 Aug 2003 16:08:37 -0400 (EDT) Message-ID: <3F394945.1020708@redhat.com> Date: Tue, 12 Aug 2003 20:08:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Carlton Cc: Mark Kettenis , gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] Per-objfile data mechanism References: <200307131717.h6DHH425098569@elgar.kettenis.dyndns.org> <20030715161729.GA32437@nevyn.them.org> <200308101903.h7AJ32Bx079942@elgar.kettenis.dyndns.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-08/txt/msg00207.txt.bz2 > > The concrete reason for that suggestion is that I have a patch > awaiting review adding some per-objfile data that consists of an > expanding hash table; that can't be handled with an obstack. In > general, I get the feeling that we're moving a bit more to data > structures that are less obstack friendly, but who knows. Having said > that: So I'm not the only one looking at the N different structures mapping onto partial symbols :-) They appear to bloat the overhead of a partial symbol to the point where a more unified structure and a full symbol might be smaller! I just converted gdbarch to an obstack and encountered two occasions where xmrealloc would have made my life a little easier. Instead of proposing the use of mmalloc (and hence xmrealloc) though, I modified the algorithms / structures a little and avoided the problem. Is it possible that the same situtation is being encountered here? A growable hash table can be implemented without needing to reclaim memory - something more along the lines of a btree? Andrew