Here you could find some tools that you could use for your work:
(1)
Valgrind (
http://www.valgrind.org/ ) is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail. You can also use Valgrind to build new tools.The Valgrind distribution currently includes six production-quality tools: a memory error detector,two thread error detectors, a cache and branch-prediction profiler, a call-graph generating cache and branch-prediction profiler, and a heap profiler. It also includes three experimental tools: a heap/stack/global array overrun detector, a second heap profiler that examines how heap blocks are used, and a SimPoint basic block vector generator.
(2)
Memcheck a memory error detector
(
http://valgrind.org/docs/manual/mc-manual.html)
(3)Try the
goole-perftools (
http://code.google.com/p/gperftools/?redir=1 )
Heap profiling is included in TCMalloc, and I believe it is possible to "reset"
heap usage just before your "certain stage", and query the heap state right after
Google's framework for writing C++ tests (
http://code.google.com/p/googletest/)on a variety of platforms (Linux, Mac OS X, Windows, Cygwin, Windows CE, and Symbian).
Based on the xUnit architecture. Supports automatic test discovery, a rich set of assertions, user-defined assertions, death tests, fatal and non-fatal failures, value- and type-parameterized tests, various options for running the tests, and XML test report generation.
(4)
AMD CodeAnalyst Performance Analyzer (
http://developer.amd.com/tools/CodeAnalyst/Pages/default.aspx) helps software developers to improve the performance of applications, drivers and system software. Well-tuned software delivers a better end-user experience through shorter response time, increased throughput and better resource utilization. AMD CodeAnalyst is a profiling tool used by
developers worldwide to improve the performance of games and media-oriented applications, transaction processing, and high performance scientific/engineering computation.
(5)
Memory Validator,C++ memory leak detector(http://www.softwareverify.com/cpp-memory.php)Memory Validator is a memory leak and memory error detection software tool for use by software developers, software quality assurance testers and customer support staff.
(6)
AQTime (
http://www.automatedqa.com/downloads/aqtime/index.asp), it is one of the best profiling tools I've ever used. It isn't free but you can get a 30 day trial, so if you plan on a optimizing and profiling only one project and 30 days are enough for you then I would recommend using this application.
(7)
AMD Code Analyst is free (
http://developer.amd.com/tools/CodeAnalyst/Pages/default.aspx)
(8)
Microsoft has there Windows Performance Analysis tools
(http://msdn.microsoft.com/en-us/performance/default.aspx)
(9)
Proffy (
http://www.pauldoo.com/proffy/)A native code profiler for Windows (Free software for profiling native code applications under Windows.Sampling only, no intrusive instrumentation.Call graph profiling. GUI-less. Include a single C++ header file into your application to control exactly when the profiler starts and stops.
esults saved to XML (viewable in your browser) and Graphviz "dot".Can profile multi-threaded applications.
(10)
Shiny (
http://code.google.com/p/shinyprofiler/ ) is a lightning fast, fully documented & by-far-easiest-to-use C/C++/Lua profiler with no extensive surgery. Results are smoothed & shown in run-time as a call-tree or sorted-by-time. Output also renderable as graphs in Ogre3D or your custom engine
(11)
Very Sleepy (
http://www.codersnotes.com/sleepy/) is a C/C++ CPU profiler for Windows systems.
Very Sleepy has a boatload of improvements in, such as call-graph profiling, an improved UI, load-save, GCC support, and 64-bit support. It supports any native Windows app, if it has standard PDB or DWARF2 debugging information. No recompilation is necessary – it can just attach to any app as it’s running.
Sleepy is released under the GNU Public License, so you’re guaranteed the right to the source code and to change it how you wish.
(12)
Rational Purify (
http://www-01.ibm.com/software/awdtools/purify/ and
http://www-01.ibm.com/software/awdtools/purify/win/ ) is a dynamic software analysis tool .Pinpoints hard to find memory errors such as uninitialized memory access, buffer overflow and improper freeing of memory. Identifies memory leaks (memory blocks that no longer have a valid pointer). Does not require access to source code and can thus be used with third-party libraries. Supports Visual C++ &.NET Integrates with Microsoft® Visual Studio.Operating systems supported: Windows famil.
It includes two capabilities:
1) Memory debugging (pinpoints hard to find memory errors such as uninitialized memory access,
buffer overflow and improper freeing of memory),
2) Memory leak detection
(identifies memory blocks that no longer have a valid pointer).
Purify is supported on Windows, Linux, Solaris, and AIX.
(13)
DevPartner (
http://www.microfocus.com/products/product-trials/index.aspx?ref=ddm?dpprodtry[
^])code quality, static, run time and security analysis
DevPartner is a virtual expert that automatically detects and diagnoses software defects, performance problems and security vulnerabilities lurking within application code.
(14)
The Profiler - EQATEC (
http://eqatec.com/ )
You’re welcome to create a free 15 days trial account and evaluate our solution on your own backed by our online documentation
P/S
You might want to look at the CRT Debug Heap (via crtdbg.h) that is already available in VS2005.
The reports are crude and there's no UI to drive it (unless you can find something on Google maybe),
but it might have the information you're looking for - and you already have it:
http://msdn.microsoft.com/en-us/library/x98tx3cf.aspx