Class HeapDumper


  • public class HeapDumper
    extends java.lang.Object
    Utiliy class to dump the HEAP memory of the current JVM for easier debugging of memory related problems (eg : memory leak)
    • Constructor Summary

      Constructors 
      Constructor Description
      HeapDumper()  
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void dumpHeap​(java.io.File file)
      Deprecated.
      static void dumpHeap​(java.lang.String fileName, boolean live)
      Call this method from your application whenever you want to dump the heap snapshot into a file.
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HeapDumper

        public HeapDumper()
    • Method Detail

      • dumpHeap

        @Deprecated
        public static void dumpHeap​(java.io.File file)
                             throws java.lang.Exception
        Deprecated.
        Call this method you want to dump the heap snapshot into a file.
        Parameters:
        file - a File in which to do the heap dump, must not be null
        Throws:
        java.lang.Exception - if the dump could not be performed
      • dumpHeap

        public static void dumpHeap​(java.lang.String fileName,
                                    boolean live)
        Call this method from your application whenever you want to dump the heap snapshot into a file.
        Parameters:
        fileName - name of the heap dump file
        live - flag that tells whether to dump only the live objects
      • main

        public static void main​(java.lang.String[] args)