Subject: Re: CCL:malloc etc. on DEC Alpha

From: "Peter Shenkin" <[email-masked]>
Date: Sun, 19 Mar 1995 22:49:02 -0500

On Mar 16,  6:13pm, Simon Kilvington wrote:
> Subject: CCL:malloc etc. on DEC Alpha

> Konrad Hinsen wrote:
> > 
> > However, in all cases of malloc()-related crashes I have experienced
> > so far (and that is a large number), the code calling malloc() was at
> > fault. .....

This is my experience as well.  Whether the user error trashes the
malloc() arena or not depends essentially on luck.

> 	a (fairly) easy way to check for writing passed the end of malloc
> blocks is to replace calls to malloc with calls to a routine which claims
> slightly more space than is needed, puts some id characters at the start
> and end of the block eg "MALLOC_BLOCK" or something, and returns a ptr to
> the first byte after the id....

You can also use the public-domain dbmalloc package, by Conor Cahill.
As I understand it, this package does things similar to what Konrad
suggests.  Conor also has a commercial package called Sentinel which
does fancier things as well.

I've had great success with dbmalloc over the years -- most recently,
about two weeks ago!

	-P.

-- 
************************ The secret of life: *************************
*Peter S. Shenkin, Box 768 Havemeyer Hall, Chemistry, Columbia Univ.,*
* New York, NY  10027;     [email-masked];     (212) 854-5143  *
************* If you find a loose thread, don't pull it. *************