Memory Leak occurs when a computer program consumes memory but is unable to release it back to the operating system.
Using Valgrind (Linux), Purify (Windows) tools leaks can be detected.
$valgrind --tool=memcheck --leak-check=yes program name
Ex: int main()
{
char *x= malloc (100);
return 0;
}
Using Valgrind (Linux), Purify (Windows) tools leaks can be detected.
$valgrind --tool=memcheck --leak-check=yes program name
Ex: int main()
{
char *x= malloc (100);
return 0;
}
No comments:
Post a Comment