delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/18/12:47:24

Message-Id: <200006181646.TAA03921@alpha.netvision.net.il>
Date: Sun, 18 Jun 2000 19:48:25 +0200
X-Mailer: Emacs 20.6 (via feedmail 8.1.emacs20_6 I) and Blat ver 1.8.5b
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
To: Andrey Gayvoronsky <gayvoronsky AT mail DOT ru>
CC: djgpp AT delorie DOT com
In-reply-to: <9617572459.20000619010132@mail.ru> (message from Andrey
Gayvoronsky on Mon, 19 Jun 2000 01:01:32 +1100)
Subject: Re: 'new ' operator problem
References: <9617572459 DOT 20000619010132 AT mail DOT ru>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Mon, 19 Jun 2000 01:01:32 +1100
> From: Andrey Gayvoronsky <gayvoronsky AT mail DOT ru>
> 
> Well....i need to track every call of 'new' and 'delete' and store
> info about it for debugging. The idea is: every 'new' stores info
> about size, line (where it call), file (file where it call). Every
> 'delete' clear info for entered pointer. On exit i have a list of
> 'unfree' memory with number of lines and name of files where it was
> called!

Why reinvent the wheel?  There are malloc debug packages out there
that do this for you, so perhaps you should simply use one of them.

The DJGPP FAQ list lists some of these packages in section 22.4; I
suggest to look there.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019