|
|
当我运行程序的时候,就会出现如下的提示:
*** glibc detected *** double free or corruption: 0x09887008 ***
是什么原因呢
下面是我的malloc函数,
void* mymalloc(int size)
{
void* temp;
temp=malloc(size);
if(temp==NULL)
{
printf("malloc failed");
exit(0);
}
return temp;
}
wvalue=(char*)mymalloc(4096);
free(wvalue); |
|