Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Álvaro Vega García" <avega@tid.es>
To: gdb@sourceware.org
Subject: Re: GDB STL Memory Usage Issue
Date: Wed, 11 Apr 2007 08:21:00 -0000	[thread overview]
Message-ID: <1176279667.3912.15.camel@dacha.hi.inet> (raw)
In-Reply-To: <22080b0a0704100736u77ecd68ahddcfabad8ab964d4@mail.gmail.com>

Hi,

On Tue, 2007-04-10 at 10:36 -0400, Ravi Ramaseshan wrote:
> On 4/10/07, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> > > Date: Mon, 9 Apr 2007 19:40:58 -0400
> > > From: "Ravi Ramaseshan" <ramaseshan.ravi@gmail.com>
> > >
> > > 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.
> 
Make sure your compiler version is the same than the execution versión
libreries (see your LD_LIBRARY_PATH). I have been experimented similar
problems when a project was compiled with GCC 3.4 and executed with gcc
4.1 dynamic libraries.

Redards,
Álvaro


  reply	other threads:[~2007-04-11  8:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-09 23:41 Ravi Ramaseshan
2007-04-10  8:16 ` Mark Kettenis
2007-04-10 14:36   ` Ravi Ramaseshan
2007-04-11  8:21     ` Álvaro Vega García [this message]
2007-04-10 18:59 Jude Moersdorf
2007-04-10 20:29 ` Ravi Ramaseshan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1176279667.3912.15.camel@dacha.hi.inet \
    --to=avega@tid.es \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox