Shallow heap is the memory consumed by one object. You should be able to see the overview of heap dump XX: +HeapDumpOnOutOfMemoryError -XX:HeapDumpPath = hdump.hprof ![]() If you don't want to do GC before taking heap dump then use jmap file = hdump.hprof Īdd below arguments in environment variables to automatically take heap dump when the application goes out of memory. This would do a full GC first and then take heap dump. We can install the latest java easily using the below homebrew command and set it to default java version using below commands brew install adoptopenjdkĮxport PATH=“/usr/ 11/ bin:$ PATH” ' > ~/.zshrc & source ~/.zshrc ![]() To use MAT we need to have Java version at least greater than 11 at the time of writing.
0 Comments
Leave a Reply. |