View Single Post
Re: crash in malloc() ?
Old
  (#8)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: crash in malloc() ? - 08-04-2004

malloc() crashes are usually due to you allocating and then freeing memory, and then having your program write to that memory location. Like this...
Code:
char *p = (char *)malloc(1024);
free(p);
memcpy(p, "somedata");  //  <--- VERY BAD!!!
botman
  
Reply With Quote