Malloc-checker wanted
Dennis Bednar
dennis at rlgvax.UUCP
Wed Jan 7 10:04:04 AEST 1987
In article <1030 at mirror.TMC.COM>, rs at mirror.TMC.COM (Rich Salz) writes:
>
> I'm trying to track down a malloc() failure, no doubt because
> someone is writing n+1 bytes into an n-byte block. I'm pretty
> much at the point where I want to perform checking on all
> mallocated areas by putting guard words at either end, and
> running down the list and checking each time I call malloc.
>
A package for a different type of malloc checker
was once written here at rlgvax, but the source code is
no longer on the disk. This malloc checker was developed
to track down long running programs (daemons) that call
malloc() but forget to call free(). There was a write-up
of the ideas in an issue of the ACM (SigPlan Notices I think).
I probably cannot even send you the source, because the system
malloc.c routine was borrowed and massaged. Also, the code
had a neat machine/compiler dependent (VAX and Power 6/32 only)
feature, that saved the stack trace, and the post-mortem examiner
tool used those addresses to tell you the calling subroutine
that called malloc()!
Maybe someone would like to submit a PD version of this, too?
--
-Dennis Bednar
{decvax,ihnp4,harpo,allegra}!seismo!rlgvax!dennis UUCP
More information about the Comp.unix.questions
mailing list