In my Java application a heap dump file gets generated when I read from the OutputStream
of a script. I am sure about a memory leak in my application. But even after the heap dump got generated, the thread which is causing the memory leak is not coming out. I am not catching Throwable, Exception, Error etc in the run method.
I want to know when the Heap Dump file will get generated when I have not specified any special VM argument like
-XX:+HeapDumpOnOutOfMemoryError
AFAIK, heapdumps are only automatically generated if you specify that option, at least in Oracle's JVM (don't know about the others, but I doubt they do it automatically).
In most cases you have to trigger heap dump generation manually.
There are also ways to programmatically create a heap dump, but those are JVM specific and depend on how and when the programmer calls them. If that option is used then you'd have to look for that as it could be anywhere.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.