Class HeapDumper

java.lang.Object
com.jalios.jcms.test.HeapDumper

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

    • HeapDumper

      public HeapDumper()
  • Method Details

    • dumpHeap

      @Deprecated public static void dumpHeap(File file) throws 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:
      Exception - if the dump could not be performed
    • dumpHeap

      public static void dumpHeap(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(String[] args)