Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can valgrind be used along with Cygwin?

Tags:

c

cygwin

valgrind

I am building source on Windows using Cygwin, I need to find places with memory leaks and possible memory leaks. I know about Valgrind used for memory leak detection in Linux.

  • Can Valgrind be used along with Cygwin so that it works in a Windows based environment?
  • If yes can you please tell what configurations, etc. are needed?
like image 538
akashbhatia Avatar asked Apr 21 '12 04:04

akashbhatia


People also ask

Can I use valgrind on Windows?

Valgrind heavy relies on Linux internals, that's why Valgrind does not support Windows.

How do you integrate Valgrind?

To run Valgrind, pass the executable as an argument (along with any parameters to the program). The flags are, in short: --leak-check=full : "each individual leak will be shown in detail" --show-leak-kinds=all : Show all of "definite, indirect, possible, reachable" leak kinds in the "full" report.

What are the problems with Valgrind?

Valgrind reports two types of issues: memory errors and memory leaks. When a program dynamically allocates memory and forgets to later free it, it creates a leak. A memory leak generally won't cause a program to misbehave, crash, or give wrong answers, and is not an urgent situation.

Is Valgrind ever wrong?

Yes, there are false positives with Valgrind, that's why it has suppression files for particular glibc and gcc versions, for example. The false positives may arise if you are using older valgrind with newer gcc and glibc, i.e., valgrind 3.3 with glibc 2.9.


1 Answers

No it's not supported.

Also, an obvious link: http://www.google.com/search?q=cygwin+valgrind

like image 76
Karoly Horvath Avatar answered Oct 19 '22 20:10

Karoly Horvath