Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How do I check for memory leaks? (Valgrind etc.) using C.

–1 vote
asked Jun 8 by Khalid Ayaz Khan (110 points)
How do I check for memory leaks? (Valgrind etc.) using C.

1 Answer

0 votes
answered Jun 9 by xDELLx (4,840 points)
one of most basic things you could do is always check the memory usage (when prog is running) from system monitor(linux top command) ,windows task manager or other tools

If you find the memory usage is always increasing as the execution of prog proceeds, it may have a leak.

Here you can use tools like valgrind this link explains commands valgrid uses & other basics of valgrind (http://cs.ecs.baylor.edu/~donahoo/tools/valgrind/)
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.