Documentation Contents
Java Platform, Standard Edition Troubleshooting Guide
Contents    Previous    Next

10.5 Memory Leaks

This section first describes how to troubleshoot memory leaks and then presents some possible sources of memory leaks and provides workarounds.

To get more information on a memory leak, execute java with the heap profiler active as shown in Example 10-2. Specify that the output should be generated in binary format so that you can use the jhat utility to read the output.

Example 10-2 Heap Profiler to Find a Memory Leak

$ java -agentlib:hprof=file=snapshot.hprof,format=b application

For more information on troubleshooting memory leaks, as well as descriptions of the jhat utility and other troubleshooting tools that are available, see the Java SE HotSpot VM Troubleshooting Guide.

The following issue is addressed:

Contents    Previous    Next

Oracle and/or its affiliates Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.
Contact Us