malloc后free出错 (释放了错误的地址空间)

malloc后free出错 问题 缘由分析 解决方法 问题 程序malloc后,free时 core dump 源程序以下(举例):web #include <stdio.h> #include <stdlib.h> int main() { int *buf; buf = (int *)malloc(sizeof(int)); buf++; free(buf);
相关文章
相关标签/搜索