LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   VALGRIND-Query (https://www.linuxquestions.org/questions/programming-9/valgrind-query-681131/)

inramana 11-04-2008 04:26 PM

VALGRIND-Query
 
I need a tool by which I can look/ display all the memory accesses in a program in order to resolve race conditions. I have started using valgrind but cannot find an option where this could be done..
Could anyone help me out?

TheIndependentAquarius 04-08-2010 04:22 AM

Hello !

Did you try the following command ?
Code:

valgrind --tool=memcheck --leak-check=yes progrm_name
The following text is from this page !
Quote:

The memcheck tool that we used also shows bad memory access. It reports situations when: you read uninitialized memory, read past the buffers, access freed memory etc. All with nice stack traces. This is really the primary use of Valgrind for me.

TimothyEBaldwin 04-12-2010 02:08 PM

Quote:

Originally Posted by anishakaul (Post 3928304)
Hello !

Did you try the following command?
Code:

valgrind --tool=memcheck --leak-check=yes progrm_name

Did you read the question? That would check for memory leaks and use of uninitialised memory, not race conditions.

What is required is:
Code:

valgrind --tool=helgrind program_name
See the manual: http://valgrind.org/docs/manual/hg-manual.html

TheIndependentAquarius 04-13-2010 01:41 AM

TimothyEBaldwin

Well that was enlightening ! Thanks !

May be I had not read the question properly:banghead:


All times are GMT -5. The time now is 08:02 PM.