Creating a snapshot of memory inside code (Java)

Is it possible that inside your program, by calling some java library, make java to create a snapshot of the memory of this program? (default .hprof file)

+4
source share
2 answers

You can dump heaps in your application using the example here .

+5
source

You can do this through JMX - that means you have to go to return, so to speak. Details on how to do this using code are available here .

+2
source

All Articles