Using valgrind the dynamic analysis tool - githeim/windheim_archive GitHub Wiki
Valgrind
Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail.
Install
sudo apt install valgrind