Re: [Dev-C++] how to get heap dimension
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2004-12-21 17:19:26
|
Just dumping amount of used heap is quite booring. The best solution is to use a memory debug library, that replaces the standard new and delete operators with debug-instrumented alternatives. If a program has memory leaks, you may then dump information source code file that made the memory allocation, the size of the block, sometimes date/time when it was allocated and/or data type of the memory blocks. There are a number of available debug libraries, or it's quite easy to write own new/delete replacements. /Per W On Tue, 21 Dec 2004, Renato Conte wrote: > I teach Dev-cpp to my student. > I have the problem to know the heap dimension at the beginning of main > program, > and the measure the heap memory at the end of program, so to know if > some dynamic > object remains in memory or if some mistake on new and delete. > It is important for me, because I teach C++ language, and I want the > class distructors work good. > With C++ Borland 3.1, I used the function coreleft(); > > Renato Conte from ITALY > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |