Trying to get the exact location of memory leak

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Trying to get the exact location of memory leak

Thierry Lam

For the following:

 

==27549== 499712 bytes in 1 blocks are definitely lost in loss record 191 of 196

==27549==    at 0x1B9005BD: malloc (vg_replace_malloc.c:130)

==27549==    by 0x1CD747E5: Run(std::string const&, std::string const&) (in /home/test.so)

==27549==    by 0x1CD74E1D: Stuff(std::string const&, std::string const&) (in /home/test.so)

 

Is it possible to get the line number of where the leak is happening in my Run(…) method and also the file name?

 

In Purify, it usually tells you which member is leaking, in valgrind it seems to be pointing the function only.

 

 

Thanks

Thierry

Reply | Threaded
Open this post in threaded view
|

Re: Trying to get the exact location of memory leak

njn (Bugzilla)-2
On Thu, 26 May 2005, Thierry Lam wrote:

> Is it possible to get the line number of where the leak is happening in
> my Run(...) method and also the file name?

Did you compile with -g to include debugging information?

N


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users