List Info

Thread: RE: GDB STL Memory Usage Issue




RE: GDB STL Memory Usage Issue
country flaguser name
United States
2007-04-10 13:59:36
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-ownersourceware.org [mailto:gdb-ownersourceware.org] On
Behalf Of Ravi Ramaseshan
Sent: Tuesday, April 10, 2007 7:36 AM
To: Mark Kettenis
Cc: gdbsourceware.org
Subject: Re: GDB STL Memory Usage Issue

On 4/10/07, Mark Kettenis <mark.kettenisxs4all.nl> wrote:
> > Date: Mon, 9 Apr 2007 19:40:58 -0400
> > From: "Ravi Ramaseshan"
<ramaseshan.ravigmail.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.
"

Re: GDB STL Memory Usage Issue
user name
2007-04-10 15:29:30
On 4/10/07, Jude Moersdorf <Jude.Moersdorfpt.com> wrote:
> 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.
>

No, my application is single threaded.

> -----Original Message-----
> From: gdb-ownersourceware.org [mailto:gdb-ownersourceware.org] On
> Behalf Of Ravi Ramaseshan
> Sent: Tuesday, April 10, 2007 7:36 AM
> To: Mark Kettenis
> Cc: gdbsourceware.org
> Subject: Re: GDB STL Memory Usage Issue
>
> On 4/10/07, Mark Kettenis <mark.kettenisxs4all.nl> wrote:
> > > Date: Mon, 9 Apr 2007 19:40:58 -0400
> > > From: "Ravi Ramaseshan"
<ramaseshan.ravigmail.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. "
>


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

" Reality is only something we believe in strongly.
"

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )