Dynamic Memory Allocation in C - malloc, free, and buffer overflows
When writing programs in the C programming language there are many occasions when you need to use dynamic memory allocation, to ask the OS for some memory. In C you do this with malloc() and you return it with free(). However C doesn't check what you do with the memory, which is why there is a risk of buffer overflows or buffer overruns. infer - A tool to detect bugs in Java and C/C++/Objective-C code - https://fbinfer.com/ valgrind - automatically detect many memory management and threading bugs - https://valgrind.org/ Introduction to Android app development: https://www.dgitacademy.com Let Me Explain T-shirt: https://teespring.com/gary-explains-let-me-explain-2 Twitter: https://twitter.com/garyexplains Instagram: https://www.instagram.com/garyexplains/ #garyexplains
When writing programs in the C programming language there are many occasions when you need to use dynamic memory allocation, to ask the OS for some memory. In C you do this with malloc() and you return it with free(). However C doesn't check what you do with the memory, which is why there is a risk of buffer overflows or buffer overruns. infer - A tool to detect bugs in Java and C/C++/Objective-C code - https://fbinfer.com/ valgrind - automatically detect many memory management and threading bugs - https://valgrind.org/ Introduction to Android app development: https://www.dgitacademy.com Let Me Explain T-shirt: https://teespring.com/gary-explains-let-me-explain-2 Twitter: https://twitter.com/garyexplains Instagram: https://www.instagram.com/garyexplains/ #garyexplains