Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!sundc!rlgvax!dennis From: dennis@rlgvax.UUCP (Dennis Bednar) Newsgroups: comp.sources.wanted,comp.unix.questions Subject: Re: Malloc-checker wanted Message-ID: <311@rlgvax.UUCP> Date: Tue, 6-Jan-87 19:04:04 EST Article-I.D.: rlgvax.311 Posted: Tue Jan 6 19:04:04 1987 Date-Received: Tue, 6-Jan-87 23:51:20 EST References: <1030@mirror.TMC.COM> Organization: Computer Consoles Inc, Reston VA Lines: 27 Summary: Malloc()/free() tool wanted Xref: mnetor comp.sources.wanted:262 comp.unix.questions:546 In article <1030@mirror.TMC.COM>, rs@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