LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 03: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, 03:22 AM   #2
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,732
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
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, 01: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, 12:41 AM   #4
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,732
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
TimothyEBaldwin

Well that was enlightening ! Thanks !

May be I had not read the question properly

Last edited by Aquarius_Girl; 04-13-2010 at 12:42 AM.
 
  


Reply



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 01:49 PM
Cannot use valgrind g4j31a5 Programming 1 01-12-2007 04:24 AM
valgrind with C++ yashwantpinge Programming 2 02-16-2006 03:56 PM
Valgrind not included? Zeno McDohl Slackware 1 02-05-2006 03:13 PM
Valgrind 2.2.0 works sridurai Linux - General 0 02-18-2005 05:51 AM

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

All times are GMT -5. The time now is 07:40 PM.

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