Skip to main content Skip to main navigation Skip to search Skip to footer

Get the Better of Memory Leaks with Valgrind

Get the Better of Memory Leaks with Valgrind

Abstract

Today softwares are written with great innovation and care. Extreme care is taken to ensure that the software performs well, whether it is on the User Interface (GUI) front, features or performance front. With the growing advent of applications being developed and ported on GNU/Linux it becomes essential for a GNU/Linux developer to develop software which caters to the user’s need and performs well on a variety of hardware on which GNU/Linux runs. With the embedded domain on GNU/Linux really catching up and the growing number of applications being developed for embedded devices like mobiles, PDAs, gaming consoles etc., it becomes essential to have  software which utilizes the limited memory available on these systems and makes best use of it. In spite of great care being taken for developing quality software, developers are bound to make mistakes, thus resulting in bugs in the software. One such bug which can cause problems on PC and create havoc in embedded devices is “Memory Leak”.
In this article, we will discuss about a free and opensource tool called Valgrind using which you can easily detect and fix memory leaks in your applications.

Excerpts from the Paper
According to Valgrind manual: A memory leak is a part of memory that has been allocated but not freed after its usage or when pointer to a memory allocation is deleted, thereby making  the memory  unusable. The more  often  this  memory leak occurs the more valuable memory will be wasted and taken away from other processes thereby affecting the whole system.If your applications’ usage exceeds the virtual memory size, it will crash the system.
 
Various tools are available for detecting memory leaks and other bugs in your programs.The most popular and well known  tools are Purify  (IBM) and Valgrind. IBM’s Purify runs on GNU/Linux and Windows but is proprietary and expensive. Being  tux lovers we will focus on a free, open-source memory-leak detection tool called Valgrind.

 

DOWNLOAD THE WHITEPAPER

Contact Us
MAX CHARACTERS: 10,000

We will treat any information you submit with us as confidential. Please read our privacy statement for additional information.

We will treat any information you submit with us as confidential. Please read our privacy statement for additional information.