21 Aug, 2008, Nash wrote in the 1st comment:
Votes: 0
Can anyone point me towards a good tutorial of valgrind, especially for snooping for an extended period of time?
My first attempt caused everything (mud, telnet, ftp) to lag out when I tried to do the above, which doesnt' sound normal.
21 Aug, 2008, David Haley wrote in the 2nd comment:
Votes: 0
That is quite normal – valgrind is rather CPU intensive, because it has to simulate every instruction with debugging hooks. If you have a CPU quota or a slow computer, it wouldn't be surprising that things would grind (no pun intended…) to a halt for you.
22 Aug, 2008, Conner wrote in the 3rd comment:
Votes: 0
In fact, that's not even so uncommon if you have a computer that's not so slow.. but "a good tutorial of valgrind" would still be nice to find for others too (myself included), any suggestions on what was actually requested? (Other than "google it", that is…)
22 Aug, 2008, Guest wrote in the 4th comment:
Votes: 0
And to top things off, Valgrind is simply intensive, period. Even on a nice fast CPU with no quotas binding it up. It's also a deep memory hog. So there's not a lot of places that will tolerate its use long-term. I happen to be one of those few who will tolerate it being used. Provided it's not for more than a few hours at a time, and definitely not unattended, but…. yeah. I digress.

I don't know of any decent tutorials on how to use it. The online manual for it isn't the worst I've seen. Would be best to start there.
22 Aug, 2008, David Haley wrote in the 5th comment:
Votes: 0
There isn't really that much to running it, actually. Just start your program with it, perhaps with the memory check flag that it gives you when you shut it down, and then you just wait and watch what it prints.
22 Aug, 2008, Pedlar wrote in the 6th comment:
Votes: 0
I think his problem, is knowing what to do with what it Prints David
22 Aug, 2008, David Haley wrote in the 7th comment:
Votes: 0
Well, that's not what his question was, although I agree that might be his problem. :wink: Reading what it tells you is really quite easy as long as you understand the concepts, and I'm not sure that the guides to the concepts are specific to valgrind. If you're not understanding what memory leaks, uninitialized values, etc. are, then the problem is deeper than knowing how to read valgrind's output. If somebody's looking to understand the concepts, I would not recommend reading about valgrind at all, but instead, I'd recommend generic C guides on memory leaks and other common problems.
22 Aug, 2008, Conner wrote in the 8th comment:
Votes: 0
I'd think some insight into which flags to use with valgrind, and for what, might be almost as useful as guidance in understanding what to do with it's output, but I'll be the first to come forward and confess that some of valgrind's output borders on the cryptic. On the other hand, memory management is clearly not my forte either. :shrug:
22 Aug, 2008, David Haley wrote in the 9th comment:
Votes: 0
The main useful flag in my experience is the one that it tells you about upon termination: –leak-check=full. That tells it to track memory usage more carefully and give more detailed reports on potential and actual memory leaks.
22 Aug, 2008, Kline wrote in the 10th comment:
Votes: 0
http://www.cprogramming.com/debugging/va...

The only link I've kept bookmarked in regards to Valgrind, and it has some pretty good info, down to deciphering some of the output. Hope it helps!
23 Aug, 2008, Conner wrote in the 11th comment:
Votes: 0
Nice find, Kline, and it even covers the flag that David indicated was his favorite too. Thanks! :smile:
0.0/11