使用 jmap -dump:format=b,file=324789.hprof 324789
where 324789 is the process id
After executing the command, a 324789.hprof file will be generated in the current path, which is a bit large
Use eclipse's Memory Analysis tool (requires installation)
Open the file for analysis