DragonFly BSD
DragonFly bugs List (threaded) for 2004-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cu coredumps


From: Diane Bruce <db@xxxxxx>
Date: Wed, 27 Oct 2004 15:31:34 -0400

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]