Skip to content

burkaykinik/MemoryLeakDetector

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gcc -g -c mld.c -o mld.o
gcc -g -c LinkedList/LinkedListApi.c -o LinkedList/LinkedListApi.o
gcc -g -c app.c -o app.o
gcc -g -o exe app.o LinkedList/LinkedListApi.o mld.o

Run the program as :
./exe


The program will print the leaked objects as below.
Program also print the structure db and object db, but here i am pasting the final
outcome of the program - set of leaked objects. As you can see, in app.c, I had intentionally leaked
the below object which is being shown as leaked.


Dumping Leaked Objects
-----------------------------------------------------------------------------------------------------|
0   ptr = 0x55cf26d86a40 | next = 0x55cf26d86a10 | units = 1    | struct_name = student_t  | is_root = FALSE |
-----------------------------------------------------------------------------------------------------|
student_t[0]->stud_name = shivani
student_t[0]->rollno = 0
student_t[0]->age = 0
student_t[0]->aggregate = 0.000000
student_t[0]->best_colleage = (nil)

About

Library to catch Memory Leaks in C/C++ Programs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 99.7%
  • Makefile 0.3%