X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-ID: <3CC428EF.AA00360C@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Testing for memory leaks References: <4 DOT 3 DOT 2 DOT 7 DOT 2 DOT 20020419032335 DOT 00bb6378 AT mail DOT ciudad DOT com DOT ar> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 35 Date: Mon, 22 Apr 2002 18:16:17 GMT NNTP-Posting-Host: 12.90.175.87 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1019499377 12.90.175.87 (Mon, 22 Apr 2002 18:16:17 GMT) NNTP-Posting-Date: Mon, 22 Apr 2002 18:16:17 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "R. Grela" wrote: > > I'm writing a class that uses pointers and I want to check if all of them > are destroyed correctly, so I'm looking for a function that gives me some > information about the memory available or memory used to check if at the > program starts and the program ends the memory available is exactly equal. > I don't know how memory management is implemented in programs compiled with > djgpp, I've looked the _go32_dpmi_get_free_memory_information function in > go32.h but I've make a test to get that information before and after making > MyObject* obj = new MyObject; and I get the same results viewing the field > available_physical_pages in _go32_dpmi_meminfo structure. > May be I'm checking in the wrong place. > (I remember in bc++ 3.1 that I've used the function coreleft) > > Anyone knows how can I get that information? I have built a replacement for the DJGPP malloc package, see: which can be linked into your program, and then totally replaces the distributed package. This includes hooks for following the allocated and free chains, but no user level software (other than the testing code) for using it. Note that this IS NOT a part of the DJGPP package, although it may become such in future. The make file generates several versions, including the linkable system version. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net) Available for consulting/temporary embedded and systems. USE worldnet address!