Previous Lecture | lect12 Slides | Next Lecture |
Code from lecture
https://github.com/ucsb-cs16-f18-mirza/cs16-f18-lectures/tree/master/lec-12
Topics
- Problems with dynamic memory: memory leaks and dangling pointers
- Dynamic memory pitfalls: memory leaks (how to avoid and detect (valgrind))
- Intro to gdb
- Practice with small linked list
- To run your code in valgrind use the following command:
valgrind --leak-check=full <name of your executable>