Re: [SLUG] Malloc replacement

From: R.G. Mayhue (r.g.mayhue@verizon.net)
Date: Sat May 24 2003 - 06:08:01 EDT


On Saturday 24 May 2003 02:26 am, Paul M Foster wrote:
>
> I've got a C program I'm writing, in which something appears to be
> stepping on something else's memory. Does anyone have _personal_
> experience with a good memory checker/malloc replacement that might
> assist in debugging what's gone errant?
>
> Paul

A call to malloc() does not clear the allocated memory so there can be random
data in the allocated space. Could that be the cause of your problem?

A call to calloc() allocates the needed space and also sets it to zero.

I have run into that before.

Hope that helps.

-- 
R.G. Mayhue
r.g.mayhue@verizon.net



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:14:32 EDT