摘要:
Most bugs show themselves in NULL pointer dereferences or by the use of other incorrect pointer values. The usual outcome of such bugs is an oops message. 大多数bug通常是因为dereference一个NULL指针或者使用了错误的指针值。这类b... 阅读全文
摘要:
1、malloc完为什么一定要free?A-通过malloc得到的内存有两种方式可以得到释放:程序结束,free释放。如果一个程序不停的malloc而不释放,会出现什么问题?你可以试试,你的狗狗很快就会汪汪叫的~~~可以用下面的程序试。。。这就是所谓的内存泄露,杀人于无形。当然,如果不是在无限的循环当中,你的程序马上就会终结的话,比如在cgi里,没什么好担心的----至少linux里可以这样,具体... 阅读全文