From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9170 invoked by alias); 12 Aug 2003 20:51:40 -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 9148 invoked from network); 12 Aug 2003 20:51:39 -0000 Received: from unknown (HELO hawaii.kealia.com) (209.3.10.89) by sources.redhat.com with SMTP; 12 Aug 2003 20:51:39 -0000 Received: by hawaii.kealia.com (Postfix, from userid 2049) id 5C4A5CB1B; Tue, 12 Aug 2003 13:51:38 -0700 (PDT) To: Andrew Cagney 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> <3F394945.1020708@redhat.com> From: David Carlton Date: Tue, 12 Aug 2003 20:51:00 -0000 In-Reply-To: <3F394945.1020708@redhat.com> (Andrew Cagney's message of "Tue, 12 Aug 2003 16:08:37 -0400") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-08/txt/msg00209.txt.bz2 On Tue, 12 Aug 2003 16:08:37 -0400, Andrew Cagney said: > 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? Sure, I could replace the data structure in question by a different one which is more obstack-friendly; it would be work, and the resulting code would initially be less reliable, but it could be done. But I guess I don't understand why obstacks are supposed to be so wonderful. They're useful if you're allocating zillions of small objects that should all disappear at the same time, but I don't see the value of trying to fit all of our data structures into them. David Carlton carlton@kealia.com