In Linux under some C language programs, the biggest problem is that there is no good programming IDE, of course, like KDevelop and other tools are quite powerful, but I still used to use the KDevelop tool, because there is not a custom programming IDE, Memory detection is also a big problem with programming programs in Linux.
Does it mean that there is no memory-checking tool that can be used in Linux or, like Valgrind tools, is pretty good. His download address is http://valgrind.org/downloads/current.html#current download a valgrind 3.2.3 (tar.bz2) tool, according to the inside of the readme prompts, This tool can be used to detect memory leaks and memory crossings after installation. This is a no interface of the memory Detection tool, after installation, input Valgrind Ls-l Verify that the tool is working properly (this is the method in the readme, is actually to verify the memory of the LS-L command), if you see a bunch of information that your tool can be used.
When compiling your program, please set the-g parameter, compile it and use the following command to determine the memory leak of your program:
Valgrind--tools=memcheck--leak-check=full Yourprog will see your memory problem in the output information. You can refer to the output information of Valgrind--help about what these parameters mean.