Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* RE: GDB STL Memory Usage Issue
@ 2007-04-10 18:59 Jude Moersdorf
  2007-04-10 20:29 ` Ravi Ramaseshan
  0 siblings, 1 reply; 6+ messages in thread
From: Jude Moersdorf @ 2007-04-10 18:59 UTC (permalink / raw)
  To: Ravi Ramaseshan; +Cc: gdb

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 <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.

-- 
Ravi Ramaseshan
http://www.geocities.com/ramaseshan_ravi/

" Reality is only something we believe in strongly. "


^ permalink raw reply	[flat|nested] 6+ messages in thread
* GDB STL Memory Usage Issue
@ 2007-04-09 23:41 Ravi Ramaseshan
  2007-04-10  8:16 ` Mark Kettenis
  0 siblings, 1 reply; 6+ messages in thread
From: Ravi Ramaseshan @ 2007-04-09 23:41 UTC (permalink / raw)
  To: gdb

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,
-- 
Ravi Ramaseshan
http://www.geocities.com/ramaseshan_ravi/

" Reality is only something we believe in strongly. "


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-04-11  8:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-10 18:59 GDB STL Memory Usage Issue Jude Moersdorf
2007-04-10 20:29 ` Ravi Ramaseshan
  -- strict thread matches above, loose matches on Subject: below --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox