|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mssm.crover.memtest.LeakTester
Test a class use scenario for memory leaks. Memory leaks appear when unused instances are not properly unreferenced. Being still referenced, these instances cannot be garbage collected. It is generally difficult to find memory leaks and they are easy to introduce. The following methode is used by LeakTester to detect important memory leaks.
| Constructor Summary | |
LeakTester()
|
|
| Method Summary | |
static long |
freemem()
|
static void |
fullGC()
|
abstract void |
init()
Initialize the experiment. |
void |
interact(java.lang.String message)
|
void |
main(java.lang.String[] args)
Run the test. |
void |
printDetails()
|
void |
setInitialUse(int initial_use)
Sets the number of times use() will be called before actually testing for memory leaks. |
void |
setInteractive(boolean flag)
Sets the interactive mode on/off. |
void |
setRepeatExperiment(int times)
Sets the number of times use() is called before the conclusion that no memory leak occurs can be assumed. |
abstract void |
use()
Override to provide the use scenario. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LeakTester()
| Method Detail |
public void main(java.lang.String[] args)
public void interact(java.lang.String message)
public void printDetails()
public static long freemem()
public abstract void init()
public abstract void use()
public void setInitialUse(int initial_use)
public void setInteractive(boolean flag)
public void setRepeatExperiment(int times)
public static void fullGC()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||