Linux C program memory leakage detection

Source: Internet
Author: User

C language in LinuxProgramThe biggest problem is that I don't have a good programming ide. Of course I want kdevelop and other tools to be quite powerful, but I am still used to using kdevelop tools. Because I don't have a habit of programming IDE, memory detection has become a major problem in programming in Linux.
Doesn't it mean that there is no memory check tool that can be used in Linux? It's not like valgrind. He is http://valgrind.org/downloads/current.html#current downloading a valgrind 3.2.3 (tar.bz2)
Tool. Follow the README prompts in the tool. After installation, you can use this tool to detect memory leaks and out-of-bounds memory. This is a memory detection tool without interface. After installation, enter
Valgrind LS-l verify whether the tool works properly (this is the method in README, actually it is to verify
-L command memory detection). If you see a pile of information, your tool can be used.

When compiling your program, set the-G parameter. After compilation, use the following command to determine whether your program has memory leakage:
Valgrind -- tool = memcheck -- leak-check = Full yourprog will see your memory problems in the output information. For more information about the meaning of these parameters, see the output information of valgrind -- help.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.