Saturday 17 December 2016

The double free or corruption error

The double free or corruption error will occur when there is a bad memory usage. Bad memory means you are using a location in memory which is not allocated or it is allocated to some other variable.

It can also occur if you try to free a memory other than the allocated memory.

This will generate segmentation fault. The segmentation fault may not occur sometimes because there are only few processes running in the system. The segmentation fault will usually occur with 100% probability in hardware boards but may not occur sometimes when running on the cpu.

The best ways that I suggest to analyse these crashes are the tools - Valgrind and Gdb.

No comments:

Post a Comment