开发者

memory (leaks) after executing

I'm wondering 开发者_StackOverflowwhy randomly after executing the ./a.out I get the following. Any ideas what I'm doing wrong? Thanks

memory (leaks) after executing

http://img710.imageshack.us/img710/8708/trasht.png


As the error suggests you probably have a double free() or heap corruption

Edit: Either you're freeing the same buffer more than once or you're writing bytes in a memory region you shouldn't be writing to. The latter might be caused by writing in the buffer after freeing it or writing outside the buffer bounds.

Perhaps Memcheck can help pinpoint the problem.

Compile your program with debug information cc -g and run valgrind ./a.out

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜