|
From: Santosh I. <san...@gm...> - 2005-10-11 10:28:29
|
---------- Forwarded message ---------- From: Santosh Itkare <san...@gm...> Date: Oct 11, 2005 3:24 PM Subject: To: val...@va... Hi, I am tring your memcheck tool for memory-leak checking but in this it won't redirect malloc and calloc function to your malloc and calloc function. Hence I am getting result as No malloc'd blocks -- no leaks are possible. so can you plz tell me what is wrong. what I have tried is: #valgrind --tool=3Dmemcheck --leak-check=3Dfull --leak-resolution=3Dlow --show-reachable=3Dyes -v ./webs -d -f ../../ where webs is my program(to be running and check) I got as follows --17896-- REDIR: 0x1BB05B20 (memset) redirected to 0x1B900B54 (memset) --17896-- REDIR: 0x1BB04500 (rindex) redirected to 0x1B900224 (rindex) --17896-- REDIR: 0x1BB041D0 (strlen) redirected to 0x1B9004D4 (strlen) --17896-- REDIR: 0x1BB043B0 (strncmp) redirected to 0x1B9006E0 (strncmp) --17896-- REDIR: 0x1BB04470 (strncpy) redirected to 0x1B9005D8 (strncpy) --17896-- REDIR: 0x1BB02E30 (index) redirected to 0x1B9002CC (index) --17896-- REDIR: 0x1BB03A40 (strcpy) redirected to 0x1B900528 (strcpy) --17896-- REDIR: 0x1BB02FA0 (strcmp) redirected to 0x1B900738 (strcmp) --17896-- REDIR: 0x1BB06130 (memcpy) redirected to 0x1B9007BC (memcpy) in my program I have used calloc and malloc then also it won't redirect the= m to ur program. so can you tell me what is wrong and how can I check my memeory-leaks more easily. -- Have A Good Day Good Bye Santosh -- Have A Good Day Good Bye Santosh |
|
From: Tom H. <to...@co...> - 2005-10-11 10:55:20
|
In message <216...@ma...>
Santosh Itkare <san...@gm...> wrote:
> I got as follows
>
> --17896-- REDIR: 0x1BB05B20 (memset) redirected to 0x1B900B54 (memset)
> --17896-- REDIR: 0x1BB04500 (rindex) redirected to 0x1B900224 (rindex)
> --17896-- REDIR: 0x1BB041D0 (strlen) redirected to 0x1B9004D4 (strlen)
> --17896-- REDIR: 0x1BB043B0 (strncmp) redirected to 0x1B9006E0 (strncmp)
> --17896-- REDIR: 0x1BB04470 (strncpy) redirected to 0x1B9005D8 (strncpy)
> --17896-- REDIR: 0x1BB02E30 (index) redirected to 0x1B9002CC (index)
> --17896-- REDIR: 0x1BB03A40 (strcpy) redirected to 0x1B900528 (strcpy)
> --17896-- REDIR: 0x1BB02FA0 (strcmp) redirected to 0x1B900738 (strcmp)
> --17896-- REDIR: 0x1BB06130 (memcpy) redirected to 0x1B9007BC (memcpy)
Those don't tell you much it is the "redir resolved" lines that are
important.
> in my program I have used calloc and malloc then also it won't
> redirect them to ur program. so can you tell me what is wrong and
> how can I check my memeory-leaks more easily.
Is your program statically linked? If it is then valgrind can't
intercept the calls and you will need to dynamically link it.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|