From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18434 invoked by alias); 20 Sep 2002 23:17:51 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 18422 invoked from network); 20 Sep 2002 23:17:49 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 20 Sep 2002 23:17:49 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g8KN0Li19022 for ; Fri, 20 Sep 2002 19:00:21 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g8KNHlh15887; Fri, 20 Sep 2002 19:17:47 -0400 Received: from romulus.sfbay.redhat.com (IDENT:zrPZItMgUWm6sJCgDo4VwVyk1EF+hrNz@romulus.sfbay.redhat.com [172.16.27.251]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g8KNHhC21754; Fri, 20 Sep 2002 16:17:43 -0700 Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g8KNHfu27649; Fri, 20 Sep 2002 16:17:41 -0700 Date: Fri, 20 Sep 2002 16:17:00 -0000 From: Kevin Buettner Message-Id: <1020920231741.ZM27648@localhost.localdomain> In-Reply-To: David Carlton "xmmalloc?" (Sep 20, 3:55pm) References: To: David Carlton , gdb Subject: Re: xmmalloc? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-09/txt/msg00328.txt.bz2 On Sep 20, 3:55pm, David Carlton wrote: > Does GDB currently use xmmalloc in any consistent way? It may have at one time, but I don't think it does any longer. > When writing > functions that might call xmalloc, should I try to write versions that > call xmmalloc instead and try to find an appropriate md to pass to > them? If I don't do that but instead just use xmalloc, will anything > bad happen? In particular, am I opening up myself to any new > possible memory leaks, other than the ones that are, of course, always > possible when calling xmalloc? In my opinion, we should just use xmalloc(). > Any background info on this would be appreciated. See http://sources.redhat.com/gdb/5/onlinedocs/mmalloc.html Basically, mmalloc was a library which used mmap() for doing allocations. If done right, this could be used to implement a saved state mechanism, but I don't think we've been careful enough in GDB in recent years for this stuff to still work. If someone knows if it ever worked I'd like to hear about the capabilities that it gave GDB.