|
-
April 16th, 1999, 07:39 AM
#1
Heap statistics
Has somebody tried to get specified statistics about heap allcations/frees on per-thread/per function level?
Is somewhere a class, which could give me information about heap allocations/deletions (the best would be this class to have an activate/deactivate function, because I need only partial statistics - in one part of the code)...
-
April 16th, 1999, 09:20 AM
#2
Re: Heap statistics
MFC's DEBUG_NEW enables this kind of stuff. When you compile a debug version of your program, DEBUG_NEW keeps track of the file name and line number for each object that it allocates. Then, when you call DumpAllObjectsSince, as described in the topic 'Dumping All Objects', each object allocated with DEBUG_NEW will be shown with the file and line number where it was allocated, thus allowing you to pinpoint the sources of memory leaks, etc.
Check out 'Tracking Memory Allocations' in the online docs.
Dave
-
April 16th, 1999, 11:53 AM
#3
Re: Heap statistics
Also have a look at _heapwalk. It requires a bit of effort on your part to use however.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|