57 lines
3.9 KiB
HTML
57 lines
3.9 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="concept" />
|
||
|
<meta name="DC.Title" content="Find memory leaks" />
|
||
|
<meta name="abstract" content="If the performance of your program degrades as it runs for a longer period of time, you may have erroneously coded a memory leak. You can use the Java Watcher to help you debug your program and locate memory leaks by performing Java application heap analysis and object create profiling over time." />
|
||
|
<meta name="description" content="If the performance of your program degrades as it runs for a longer period of time, you may have erroneously coded a memory leak. You can use the Java Watcher to help you debug your program and locate memory leaks by performing Java application heap analysis and object create profiling over time." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="debug.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="findleak" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Find memory leaks</title>
|
||
|
</head>
|
||
|
<body id="findleak"><a name="findleak"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Find memory leaks</h1>
|
||
|
<div><p>If the performance of your program degrades as it runs for a longer
|
||
|
period of time, you may have erroneously coded a memory leak. You can use
|
||
|
the Java™ Watcher
|
||
|
to help you debug your program and locate memory leaks by performing Java application
|
||
|
heap analysis and object create profiling over time.</p>
|
||
|
<p>For more details, see <a href="http://www.ibm.com/eserver/iseries/support/i_dir/idoctor.nsf/jw.html" target="_blank">JavaWatcher</a>.</p>
|
||
|
<p>You can also use the Analyze Java Virtual Machine (ANZJVM) control language
|
||
|
command to find object leaks. ANZJVM finds object leaks by taking two copies
|
||
|
of the garbage collection heap that are separated by a specified time interval.
|
||
|
To find object leaks, you would look at the number of instances of each class
|
||
|
in the heap. Classes that have an unusually high number of instances should
|
||
|
be noted as possibly leaking.</p>
|
||
|
<p>You should also note the change in number of instances of each class between
|
||
|
the two copies of the garbage collection heap. If the number of instances
|
||
|
of a class continually increases, that class should be noted as possibly leaking.
|
||
|
The longer the time interval between the two copies, the more certainty you
|
||
|
have that objects are actually leaking. By running ANZJVM a series of times
|
||
|
with a larger time interval, you should be able to diagnose with a high degree
|
||
|
of certainty what is leaking. </p>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="debug.htm" title="To debug Java programs from the i5/OS command line, select one of the options listed here.">Debug Java programs from an i5/OS command line</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|