Control what happens with malloc() / free() prorammming errors
The mallopt(M_CHECK_ACTION, ...) can control when happens
with you double free or other allocation mistakes.
Where option is:
0 Ignore error conditions; continue execution (with undefined results).
1 Print a detailed error message and continue execution.
2 Abort the program.
3 Print detailed error message, stack trace, and memory mappings, and abort the program.
5 Print a simple error message and continue execution.
7 Print simple error message, stack trace, and memory mappings, and abort the program.
Notice by miss-using this you could generate a stack trace any time you want.