Unix Programming - memory leak & double free checks

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > October 2004 > memory leak & double free checks





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author memory leak & double free checks
vertigo

2004-10-26, 5:51 pm

Hello
Is there any software for *bsd which could help in debugging my
application ? (i need to find memory leaks, and i have problems with
double free()ing memory).

Thanx
Michal

vertigo

2004-10-26, 5:51 pm


by the way:
my gdb return segmentation fault when i try to debug my application. I
think it's because it's using -llthread (linux threads library).
It hangs when it has to create thread
Is it normal ?

Is there any better tool ?


Thanx
Michal

Måns Rullgård

2004-10-26, 5:51 pm

vertigo <ax178@wp.pl> writes:

> Hello
> Is there any software for *bsd which could help in debugging my
> application ? (i need to find memory leaks, and i have problems with
> double free()ing memory).


Will the code run under Linux? Then you could use Valgrind to track
down such bugs.

--
Måns Rullgård
mru@inprovide.com
Billy N. Patton

2004-10-26, 5:51 pm

vertigo wrote:
> Hello
> Is there any software for *bsd which could help in debugging my
> application ? (i need to find memory leaks, and i have problems with
> double free()ing memory).
>
> Thanx
> Michal
>


If your on solaris you could try purify, it you company has it.
I does a very good job.

--
___ _ ____ ___ __ __
/ _ )(_) / /_ __ / _ \___ _/ /_/ /____ ___
/ _ / / / / // / / ___/ _ `/ __/ __/ _ \/ _ \
/____/_/_/_/\_, / /_/ \_,_/\__/\__/\___/_//_/
/___/
Texas Instruments ASIC Circuit Design Methodology Group
Dallas, Texas, 214-480-4455, b-patton@ti.com
joe@invalid.address

2004-10-26, 5:51 pm

vertigo <ax178@wp.pl> writes:

> Is there any software for *bsd which could help in debugging my
> application ? (i need to find memory leaks, and i have problems with
> double free()ing memory).


What system is this on? If it's Solaris look at
watchmalloc(3MALLOC). If it's Solaris 9 also look at libumem(3LIB).

Joe
--
Nothing cures like time and love
- Laura Nyro
Casper H.S. Dik

2004-10-26, 5:51 pm

"Billy N. Patton" <b-patton@ti.com> writes:

>vertigo wrote:
[vbcol=seagreen]
>If your on solaris you could try purify, it you company has it.
>I does a very good job.


Or some of the built-in alternatives: watchmalloc and libumem
which come for free with the OS (libumem since update 2 of S9;
watchmalloc since 2.6 or so)

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
Chris Barts

2004-10-27, 2:49 am

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

joe@invalid.address wrote:
| vertigo <ax178@wp.pl> writes:
|
|
|>Is there any software for *bsd which could help in debugging my
|>application ? (i need to find memory leaks, and i have problems with
|>double free()ing memory).
|
|
| What system is this on? If it's Solaris look at
| watchmalloc(3MALLOC). If it's Solaris 9 also look at libumem(3LIB).
|
| Joe

Does Solaris get matched by the *bsd glob? I'm curious.

(I don't know the tangled and mixed lineages of all *nixes.)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBfzntKxatjOtX+j0RAtWXAJsHxUEXIIfe
ZMK5DL7B4wx5RmKorACfa/Ha
4mgn2QjkUCiO4jXyu5apHgY=
=0uym
-----END PGP SIGNATURE-----
Tabrez Iqbal

2004-10-27, 7:48 am

Casper H.S. Dik <Casper.Dik@Sun.COM> wrote in message news:<417eb291$0$37789$e4fe514c@news.xs4all.nl>...
> "Billy N. Patton" <b-patton@ti.com> writes:
>
>
>
> Or some of the built-in alternatives: watchmalloc and libumem
> which come for free with the OS (libumem since update 2 of S9;
> watchmalloc since 2.6 or so)
>
> Casper



any such tool for gnu/linux(say Red Hat or Mandrake) OS??

tabrez
Måns Rullgård

2004-10-27, 7:48 am

tabrez19_i@rediffmail.com (Tabrez Iqbal) writes:

> Casper H.S. Dik <Casper.Dik@Sun.COM> wrote in message news:<417eb291$0$37789$e4fe514c@news.xs4all.nl>...
>
> any such tool for gnu/linux(say Red Hat or Mandrake) OS??


valgrind

--
Måns Rullgård
mru@inprovide.com
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com