From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11814 invoked by alias); 10 Apr 2007 18:59:29 -0000 Received: (qmail 11806 invoked by uid 22791); 10 Apr 2007 18:59:28 -0000 X-Spam-Check-By: sourceware.org Received: from slogw.pt.com (HELO slogw.pt.com) (206.169.14.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Apr 2007 19:59:23 +0100 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: GDB STL Memory Usage Issue Date: Tue, 10 Apr 2007 18:59:00 -0000 Message-ID: <0F6E41788631664DBE8DF13D06298FE1948A@sloexchange01.corp.pt.com> From: "Jude Moersdorf" To: "Ravi Ramaseshan" Cc: X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00052.txt.bz2 Is your application multi-threaded? If so, are many threads created and destroyed? Check that you don't have a bunch of zombie child threads that need to be reaped. -----Original Message----- From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On Behalf Of Ravi Ramaseshan Sent: Tuesday, April 10, 2007 7:36 AM To: Mark Kettenis Cc: gdb@sourceware.org Subject: Re: GDB STL Memory Usage Issue On 4/10/07, Mark Kettenis wrote: > > Date: Mon, 9 Apr 2007 19:40:58 -0400 > > From: "Ravi Ramaseshan" > > > > Hi, > > > > I observed some strange behavior with the following system that I > > would like to know more about: > > > > I'm compiling a very memory intensive C++ application that uses STL > > (hashmaps of lists). Every few seconds I erase() the entire hashmap > > (and the lists). When I run the program standalone and examine the > > memory usage using top, I see the total virtual memory of the program > > grow (sometimes to 60+MB) before the erase call and after the erase > > call drop down to a few MB - which is the behavior I would expect. > > > > However, when I run the same program through GDB, the erase() does not > > seem to have any effect and the virtual memory usage keeps on rising - > > which I do not understand. > > > > I am using GCC 4.0.3, GDB 6.4 and am compiling the program with > > debugging information. I would like to understand the reasons for such > > a behavior of my program under GDB. > > > > Thanks in advance, > > Smells like an operating system bug to me. > > I am running an Ubuntu system 2.6.15-28-686 kernel, if that helps anyone explain the problem I observed. --=20 Ravi Ramaseshan http://www.geocities.com/ramaseshan_ravi/ " Reality is only something we believe in strongly. "