
On 1/3/06, Howard Hinnant <howard.hinnant@gmail.com> wrote:
(some day I'm going to have to start using tinyurl (or whatever it is)).
I'll help out: *http://tinyurl.com/dyz6t* (It is really easy to add a TinyURL button to your browser's toolbar. See http://tinyurl.com/#toolbar) The above is just an overloaded new using hash_map<void*, mem_info,
malloc_allocator<appropriate pair> >. (map could just as easily be used).
I've also had good luck with the Google "perftools" package ( http://goog-perftools.sourceforge.net/) for profiling code execution and memory usage. Their "TC Malloc" library can be used without re-compiling or re-linking (via LD_PRELOAD on Linux). It will dump a profile of heap usage for every 1 GiB allocated and/or every 100 MiB of heap in-use. These parameters can be tuned programattically or by re-compiling their library. -- Caleb Epstein caleb dot epstein at gmail dot com