cu coredumps

Diane Bruce db at db.net
Wed Oct 27 12:32:25 PDT 2004


On Wed, Oct 27, 2004 at 03:02:16PM -0400, Adrian Nida wrote:
> > That's what I thought, but I thought when you called free() it didn't
. ..
> You're right; free doesn't touch the data at that memory location.  So the
> best case would be your data is still accessible.  However, you should never
> expect this to be the case.

That is actually not strictly true. Some malloc implementations re-use
the freed memory that was previously assigned to the user for pointers
for it's own use. Hence, the next time you use the memory it go boom.
(Well, ok you did say that the user data may not still be accessible,
I'm just making it clear. ;-) )

- Diane VA3DB





More information about the Bugs mailing list