Main Page Compound List File List Compound Members File Members
KMtraceLeak Class Reference
The model of a memory leak.
More...
#include <KMtraceLeak.hh>
Collaboration diagram for KMtraceLeak:
[legend]List of all members.
Detailed Description
The model of a memory leak.
The model of a memory leak. A memory leak has the following properties:
- number of leaked bytes totally lost (still allocated at the end of the program)
- number of times the program accessed this memory leak (indicates whether leaks are repeating or are just one time leaks)
- number of leaked bytes in the first block
- address in memory where the first block of leak starts
These values can be only accessed via the getXXX methods.
The model is currently used by one view/control element the KMtraceLeaksViewItem . Only a one to one relation is implemented at the moment.
Each memory leak has a function call stack, represented as a KMtraceCallStack .
- Author:
- Andreas Baumann <andreas_baumann@users.sourceforge.net>
- See also:
- KMtraceLeaksViewItem, KMtraceCallStack, KMtraceCall
- Version:
Constructor & Destructor Documentation
KMtraceLeak::KMtraceLeak |
( |
|
) |
|
|
KMtraceLeak::KMtraceLeak |
( |
int |
blocks, |
|
|
int |
bytes, |
|
|
int |
firstBytes, |
|
|
QString |
firstAddress |
|
) |
|
|
Member Function Documentation
|
Adds a function call to the memory leak. Could also be seen as being part of the construction process of a memory leak object. Used by the KMtraceModel ::readModel method while parsing the kmtrace tree file and add one call stack after the other.
- Parameters:
-
call | the function to be added at the end of the current call stack of the object |
|
int KMtraceLeak::getBlocks |
( |
|
) |
|
|
int KMtraceLeak::getBytes |
( |
|
) |
|
|
|
Get the function call stack of the memory leak.
- Returns:
- the function call stack of the memory leak
|
QString KMtraceLeak::getFirstAddress |
( |
|
) |
|
|
int KMtraceLeak::getFirstBytes |
( |
|
) |
|
|
|
Get the registered view to this model. Especially useful to get to the view which must be changed based on the signal suppressionChanged .
- Returns:
- the view object to this model
|
bool KMtraceLeak::isSuppressed |
( |
|
) |
|
|
|
Returns whether the memory leak is currently suppressed or not.
- Returns:
- suppression state of the leak
|
void KMtraceLeak::setSuppressed |
( |
bool |
suppressed |
) |
|
|
|
Suppress or show the memory leak. Suppressed leaks are normally not shown to the user by the view object because they are e.g. library functions the programmer is not willing to fix.
- Parameters:
-
suppressed | set the state to suppressed or not suppressed |
|
|
Register the view/control object to this model
- Parameters:
-
kitem | the view item to be registerd |
|
void KMtraceLeak::suppressionChanged |
( |
KMtraceLeak * |
leak |
) |
[signal] |
|
|
The signal being emmited if the leak has been set in state suppressed (i.e. the user marks the leak as not interresting and it should be suppressed, see also method setSuppressed .
- Parameters:
-
leak | the model of the leak which emmits the signal |
suppressed | the flag indicating whether the leak is now suppressed or not. |
|
Member Data Documentation
int KMtraceLeak::m_blocks [private]
|
|
int KMtraceLeak::m_bytes [private]
|
|
QString KMtraceLeak::m_firstAddress [private]
|
|
int KMtraceLeak::m_firstBytes [private]
|
|
bool KMtraceLeak::m_suppressed [private]
|
|
The documentation for this class was generated from the following files:
Generated on Fri Jan 3 11:42:31 2003 for kmtraceviewer by
1.3-rc1