public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Memory monitoring
@ 2003-12-10 17:43 Klein, Bernhard
  2003-12-10 18:03 ` Eljay Love-Jensen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Klein, Bernhard @ 2003-12-10 17:43 UTC (permalink / raw)
  To: 'gcc-help@gcc.gnu.org'

Hi all,

I need to do a memory-monitoring inside my developed binary, because I have
an memory leak inside it and I can't localize it. So my idea is, a
monitoring over a couple of days/weeks. I can't use any third-party tools to
do this, because the binary works in an production environment.

How can I do this on an easy way? (is any Sourcecode available ?)

I need this under Solaris 9 and under SuSE Linux (maybe there is no
difference between both plattforms). I'm using gcc 3.3.2

Bernd Klein 
---------------------------------------------------------- 
LogicaCMG 
Financial Services, GB 21 
Flughafenallee 3 
28199 Bremen 
Phone : +49 421 30 96-121 
Fax : +49 421 30 96-118 
Email : bernhard.klein@logicacmg.com
---------------------------------------------------------- 


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

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

* Re: Memory monitoring
  2003-12-10 17:43 Memory monitoring Klein, Bernhard
@ 2003-12-10 18:03 ` Eljay Love-Jensen
  2003-12-10 20:47 ` Mihnea Balta
  2003-12-11  1:31 ` Torsten Mohr
  2 siblings, 0 replies; 6+ messages in thread
From: Eljay Love-Jensen @ 2003-12-10 18:03 UTC (permalink / raw)
  To: Klein, Bernhard, 'gcc-help@gcc.gnu.org'

Hi Bernd,

>How can I do this on an easy way?

The easiest way to do it is to test for memory leaks in a test (non-production) environment.

In that way, you can instrument the code any way that you find appropriate.

You can even replace the memory manager with one of your own devising.  Or some third-party memory manager, that has facility for tracking memory leaks.  Such as the ones from <http://www.rational.com/>, the IBM Rational Suite (Purify, Quantify, et al).

HTH,
--Eljay

Test early.  Test often.


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

* Re: Memory monitoring
  2003-12-10 17:43 Memory monitoring Klein, Bernhard
  2003-12-10 18:03 ` Eljay Love-Jensen
@ 2003-12-10 20:47 ` Mihnea Balta
  2003-12-11  1:31 ` Torsten Mohr
  2 siblings, 0 replies; 6+ messages in thread
From: Mihnea Balta @ 2003-12-10 20:47 UTC (permalink / raw)
  To: Klein, Bernhard, gcc-help

Hi,

If you're running Linux on an x86 platform, you might want to give Valgrind
a chance to look at your code. (http://valgrind.kde.org/). It's worked
wonders for me. You can run the lightweight memory checker on your
production code, if performance isn't really critical (you'll have to
compile with debugging symbols though, in order to be able to use its
output). Unfortunatelly, Valgrind won't run on any other platform, due to
the way it's designed (it's actually a CPU emulator).

----- Original Message -----
From: "Klein, Bernhard" <Bernhard.Klein@logicacmg.com>
To: <gcc-help@gcc.gnu.org>
Sent: Wednesday, December 10, 2003 7:42 PM
Subject: Memory monitoring


>
> Hi all,
>
> I need to do a memory-monitoring inside my developed binary, because I
have
> an memory leak inside it and I can't localize it. So my idea is, a
> monitoring over a couple of days/weeks. I can't use any third-party tools
to
> do this, because the binary works in an production environment.
>
> How can I do this on an easy way? (is any Sourcecode available ?)
>
> I need this under Solaris 9 and under SuSE Linux (maybe there is no
> difference between both plattforms). I'm using gcc 3.3.2
>
> Bernd Klein
> ----------------------------------------------------------
> LogicaCMG
> Financial Services, GB 21
> Flughafenallee 3
> 28199 Bremen
> Phone : +49 421 30 96-121
> Fax : +49 421 30 96-118
> Email : bernhard.klein@logicacmg.com
> ----------------------------------------------------------
>
>
> This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
>
>
> ---------------------------------------------------------------
> Acasa.ro vine cu albumele, tu vino doar cu pozele ;)
> http://poze.acasa.ro/
>
>

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

* Re: Memory monitoring
  2003-12-10 17:43 Memory monitoring Klein, Bernhard
  2003-12-10 18:03 ` Eljay Love-Jensen
  2003-12-10 20:47 ` Mihnea Balta
@ 2003-12-11  1:31 ` Torsten Mohr
  2 siblings, 0 replies; 6+ messages in thread
From: Torsten Mohr @ 2003-12-11  1:31 UTC (permalink / raw)
  To: Klein, Bernhard, 'gcc-help@gcc.gnu.org'

Hi,

don't know exactly if this a help for you, but if you're on
x86 "valgrind" could maybe be of help for you?


Regards,
Torsten.


Am Mittwoch, 10. Dezember 2003 18:42 schrieb Klein, Bernhard:
> Hi all,
>
> I need to do a memory-monitoring inside my developed binary, because I have
> an memory leak inside it and I can't localize it. So my idea is, a
> monitoring over a couple of days/weeks. I can't use any third-party tools
> to do this, because the binary works in an production environment.
>
> How can I do this on an easy way? (is any Sourcecode available ?)
>
> I need this under Solaris 9 and under SuSE Linux (maybe there is no
> difference between both plattforms). I'm using gcc 3.3.2
>
> Bernd Klein
> ----------------------------------------------------------
> LogicaCMG
> Financial Services, GB 21
> Flughafenallee 3
> 28199 Bremen
> Phone : +49 421 30 96-121
> Fax : +49 421 30 96-118
> Email : bernhard.klein@logicacmg.com
> ----------------------------------------------------------
>
>
> This e-mail and any attachment is for authorised use by the intended
> recipient(s) only. It may contain proprietary material, confidential
> information and/or be subject to legal privilege. It should not be copied,
> disclosed to, retained or used by, any other party. If you are not an
> intended recipient then please promptly delete this e-mail and any
> attachment and all copies and inform the sender. Thank you.

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

* RE: Memory monitoring
  2003-12-11  8:59 AW: " Klein, Bernhard
@ 2003-12-11  9:32 ` Rupert Wood
  0 siblings, 0 replies; 6+ messages in thread
From: Rupert Wood @ 2003-12-11  9:32 UTC (permalink / raw)
  To: 'Klein, Bernhard'; +Cc: gcc-help

Bernd Klein wrote:

> Thanks for all you help, but the real binary works under Solaris, so
> I need to check it under this OS. Are there any memory-checkers
> available under Solaris (5.9)

As Eljay said, there's Purify:

    http://www-306.ibm.com/software/awdtools/purifyplus/unix/

Last I looked (when it was still Rational) it cost $2,800 or thereabouts for
a unix licence. But we fixed all our bugs in the free trial period :-)

Looks like they still offer a free trial :-) If you can't exploit that, I'd
still check your code on linux - assuming you're running 32-bit code on
Solaris there won't be a lot of changes in your memory management code.

Rup.

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

* RE: Memory monitoring
@ 2003-12-10 17:53 Chris Croswhite
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Croswhite @ 2003-12-10 17:53 UTC (permalink / raw)
  To: Klein, Bernhard, gcc-help


Have your tried "electric fence"?
http://perens.com/FreeSoftware/



-----Original Message-----
From:	Klein, Bernhard [mailto:Bernhard.Klein@logicacmg.com]
Sent:	Wed 10-Dec-03 09:42
To:	'gcc-help@gcc.gnu.org'
Cc:	
Subject:	Memory monitoring
Hi all,

I need to do a memory-monitoring inside my developed binary, because I have
an memory leak inside it and I can't localize it. So my idea is, a
monitoring over a couple of days/weeks. I can't use any third-party tools to
do this, because the binary works in an production environment.

How can I do this on an easy way? (is any Sourcecode available ?)

I need this under Solaris 9 and under SuSE Linux (maybe there is no
difference between both plattforms). I'm using gcc 3.3.2

Bernd Klein 
---------------------------------------------------------- 
LogicaCMG 
Financial Services, GB 21 
Flughafenallee 3 
28199 Bremen 
Phone : +49 421 30 96-121 
Fax : +49 421 30 96-118 
Email : bernhard.klein@logicacmg.com
---------------------------------------------------------- 


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.



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

end of thread, other threads:[~2003-12-11  9:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-10 17:43 Memory monitoring Klein, Bernhard
2003-12-10 18:03 ` Eljay Love-Jensen
2003-12-10 20:47 ` Mihnea Balta
2003-12-11  1:31 ` Torsten Mohr
2003-12-10 17:53 Chris Croswhite
2003-12-11  8:59 AW: " Klein, Bernhard
2003-12-11  9:32 ` Rupert Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).