CMemoryState::DumpStatistics
void DumpStatistics( ) const;
Remarks
Prints a concise memory statistics report from a CMemoryState object that is filled by the Difference member function. The report, which is printed on the afxDump device, shows the following:
-
Number of “object” blocks (blocks of memory allocated using CObject::operator new) still allocated on the heap.
-
Number of nonobject blocks still allocated on the heap.
-
The maximum memory used by the program at any one time (in bytes).
-
The total memory currently used by the program (in bytes).
A sample report looks like this:
0 bytes in 0 Free Blocks
8 bytes in 2 Object Blocks
0 bytes in 0 Non-Object Blocks
Largest number used: 8 bytes
Total allocations: 8 bytes
-
The first line describes the number of blocks whose deallocation was delayed if afxMemDF was set to delayFreeMemDF. For more information, see afxMemDF, in the “Macros and Globals” section.
-
The second line describes how many object blocks still remain allocated on the heap.
-
The third line describes how many nonobject blocks (arrays or structures allocated with new) were allocated on the heap and not deallocated.
-
The fourth line gives the maximum memory used by your program at any one time.
-
The last line lists the total amount of memory used by your program.
Example
See the example for the CMemoryState constructor.
CMemoryState Overview | Class Members | Hierarchy Chart