LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-04-2008, 04:26 PM   #1
inramana
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
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?
 
Old 04-08-2010, 04:22 AM   #2
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,720
Blog Entries: 29

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
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.
 
Old 04-12-2010, 02:08 PM   #3
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
Quote:
Originally Posted by anishakaul View Post
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
 
1 members found this post helpful.
Old 04-13-2010, 01:41 AM   #4
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,720
Blog Entries: 29

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
TimothyEBaldwin

Well that was enlightening ! Thanks !

May be I had not read the question properly

Last edited by TheIndependentAquarius; 04-13-2010 at 01:42 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Valgrind - an answer. cyent Programming 6 02-11-2010 02:49 PM
Cannot use valgrind g4j31a5 Programming 1 01-12-2007 05:24 AM
valgrind with C++ yashwantpinge Programming 2 02-16-2006 04:56 PM
Valgrind not included? Zeno McDohl Slackware 1 02-05-2006 04:13 PM
Valgrind 2.2.0 works sridurai Linux - General 0 02-18-2005 06:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration