/** * Fast {@link Heap} implementation is optimized for batch processing of dump. * Unlike normal {@link Heap} it doesn't create/use any temporary files. * * @param bufferSize if file can be mapped to memory no buffer would be used, overwise limits memory used for buffering */ public static Heap createFastHeap(File heapDump, long bufferSize) throws FileNotFoundException, IOException { return new FastHprofHeap(createBuffer(heapDump, bufferSize), 0); }
/** * this factory method creates {@link Heap} from a memory dump file in Hprof format. * If the memory dump file contains more than one dump, parameter segment is used to * select particular dump. * <br> * <b>This implementation is using temporary disk files for building auxiliary indexes</b> * <br> * Speed: slow * @return implementation of {@link Heap} corresponding to the memory dump * passed in heapDump parameter * @param segment select corresponding dump from multi-dump file * @param heapDump file which contains memory dump * @throws java.io.FileNotFoundException if heapDump file does not exist * @throws java.io.IOException if I/O error occurred while accessing heapDump file */ public static Heap createHeap(File heapDump, int segment) throws FileNotFoundException, IOException { return new HprofHeap(createBuffer(heapDump, DEFAULT_BUFFER), segment); }
/** * Fast {@link Heap} implementation is optimized for batch processing of dump. * Unlike normal {@link Heap} it doesn't create/use any temporary files. * * @param bufferSize if file can be mapped to memory no buffer would be used, overwise limits memory used for buffering */ public static Heap createFastHeap(File heapDump, long bufferSize) throws FileNotFoundException, IOException { return new FastHprofHeap(createBuffer(heapDump, bufferSize), 0); }
/** * this factory method creates {@link Heap} from a memory dump file in Hprof format. * If the memory dump file contains more than one dump, parameter segment is used to * select particular dump. * <br> * <b>This implementation is using temporary disk files for building auxiliary indexes</b> * <br> * Speed: slow * @return implementation of {@link Heap} corresponding to the memory dump * passed in heapDump parameter * @param segment select corresponding dump from multi-dump file * @param heapDump file which contains memory dump * @throws java.io.FileNotFoundException if heapDump file does not exist * @throws java.io.IOException if I/O error occurred while accessing heapDump file */ public static Heap createHeap(File heapDump, int segment) throws FileNotFoundException, IOException { return new HprofHeap(createBuffer(heapDump, DEFAULT_BUFFER), segment); }