Using Valgrind

This is a discussion on Using Valgrind within the C Programming forums, part of the General Programming Boards category; I am trying to figure out how to use valgrind. So far I have merely download and unpacked the .rar ...

  1. #1
    Registered User
    Join Date
    Apr 2013
    Posts
    122

    Using Valgrind

    I am trying to figure out how to use valgrind. So far I have merely download and unpacked the .rar file. What should I do next? How may I install it and begin using it? I'd appreciate some guidance.

  2. #2
    Registered User
    Join Date
    Apr 2013
    Posts
    122
    I have tried looking for this online, but everything I have come across was rather incomprehensible.

  3. #3
    Registered User migf1's Avatar
    Join Date
    May 2013
    Location
    Athens, Greece
    Posts
    210
    Here is quick instructions for basic installation, coming from the documentation of Valgrind.

  4. #4
    Registered User
    Join Date
    Apr 2013
    Posts
    122
    I still don't understand. I am in cmd, typing ./configure, as the instructions indicate, and it doesn't work! (should it work, not being an executable?)

  5. #5
    Registered User migf1's Avatar
    Join Date
    May 2013
    Location
    Athens, Greece
    Posts
    210
    You should first extract into a directory the contents of that .rar file you said you downloaded. Then cd into that directory form the terminal (if there's a src/ directory in there, most probably you need to cd into that one ). Then try there what the docs say.

  6. #6
    Registered User
    Join Date
    Mar 2010
    Posts
    531
    "cmd" as in Windows?

  7. #7
    Registered User
    Join Date
    Apr 2013
    Posts
    122
    cmd = command prompt, via windows, yes. Did I get it all wrong?

  8. #8
    Registered User migf1's Avatar
    Join Date
    May 2013
    Location
    Athens, Greece
    Posts
    210
    Yeap, Valgrind does not work on Windows. I guess you can do it via Cygwin which is something like a Unix emulator for Windows (actually it is more of a Unix layer upon Win32, but it doesn't really matter here). However, I doubt you'd want to get into that much trouble if you are a Windows kind of guy
    Last edited by migf1; 05-24-2013 at 03:53 AM.

  9. #9
    Registered User
    Join Date
    Mar 2010
    Posts
    531
    Afraid you're out of luck -- valgrind isn't supported on Windows. I'm not sure if there is anything similar -- I search occasionally as I quite like to work on Windows, but I can't think of anything that stood out as promising.

    No, you can't use it in Cygwin either. Best shot is probably to install Linux on a VM. Quite a lot of trouble to go to.... valgrind isn't THAT great
    Last edited by smokeyangel; 05-24-2013 at 03:58 AM.

  10. #10
    Registered User migf1's Avatar
    Join Date
    May 2013
    Location
    Athens, Greece
    Posts
    210
    Quote Originally Posted by smokeyangel View Post
    ...
    Quite a lot of trouble to go to.... valgrind isn't THAT great
    So very true

    Here's an attempt for bringing Valgrind functionality to Windows. I wish them all the best.

    Purify and Insure++ are similar products for Windows, but commercial.

    Among free tools, DrMemory is a popular one (there are many others).

    For simple tasks however, a simple wrapper over malloc(), calloc(), realloc() and free() should do quite well (like the ancient mss for example... the link pops up an ad window, must be a new thing... didn't do it last time I checked).
    Last edited by migf1; 05-24-2013 at 04:21 AM.

  11. #11
    Registered User
    Join Date
    Dec 2004
    Posts
    48
    Quote Originally Posted by smokeyangel View Post
    Afraid you're out of luck -- valgrind isn't supported on Windows. I'm not sure if there is anything similar -- I search occasionally as I quite like to work on Windows, but I can't think of anything that stood out as promising.

    No, you can't use it in Cygwin either. Best shot is probably to install Linux on a VM. Quite a lot of trouble to go to.... valgrind isn't THAT great
    Except those few times when you really need it though, then it really is that great... :-)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Valgrind error help
    By edishuman in forum C Programming
    Replies: 1
    Last Post: 11-12-2011, 02:37 PM
  2. Valgrind
    By anirban in forum C Programming
    Replies: 2
    Last Post: 10-26-2010, 10:07 PM
  3. How Far Should You Go To Use Valgrind?
    By jeffcobb in forum C++ Programming
    Replies: 36
    Last Post: 02-25-2010, 04:02 PM
  4. Is valgrind always right?
    By g4j31a5 in forum Linux Programming
    Replies: 3
    Last Post: 07-16-2007, 10:39 PM
  5. Valgrind output
    By m_larkin2001 in forum C++ Programming
    Replies: 1
    Last Post: 06-09-2006, 02:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21