categories of memory error
- memory leak
- memory overflow
- dangling pointers
how to detect memory error
- ps -aux, check VSZ, e.g:
ps -aux |grep -E 'VSZ|2892.*firefox' |grep -v grep
watch -n 5 'ps -aux |grep -E "VSZ|2892.*firefox" |grep -v grep'
static program analysis tools
detect methods
- mtrace
- valgrind