This section provides a tutorial example on how to generate a heap dump file with the 'jmap -dump:file=name' command. A heap dump file contains all heap objects of JVM process.
The second function of the "jmap" tool is to generate a heap dump of a given JVM process
with the "jmap -dump:file=<filename>" command: