On 08 Mar 2007 06:31:36 -0800, Chetan Nanda <[EMAIL PROTECTED]> wrote: > Hi All, > > in the same prog, if i free the dst pointer using free(dst), > now system crashes: > > *** glibc detected *** free(): invalid next size (fast): 0x096d1008 *** > Aborted > ???
Again, it's valid behaviour. To explain it, the malloc() library may keep it's housekeeping data at the end of the block, and by overwriting it you cause problems for the library. Google [malloc implementation] if you're interested in how it may be done. -- PJH Aio, quantitas magna frumentorum est
