Learn about the java virtual machine, one of the
added operating parameters
-XX: + HeapDumpOnOutOfMemoryError -Xms30m -Xmx30m
-XX: + HeapDumpOnOutOfMemoryError this parameter will generate a stack snapshot for locating abnormal
Simulation scenario memory overflow, simple code:
1 |
package top.alertcode.demo.jvm; |
Use analysis tools MAT (Eclipse Memory Analyzer), were analyzed, it is easy to locate the cause of memory leaks that frequently create objects. Referring next to FIG:
Original: Big Box jvm virtual machine (a): analysis and problem solving jvm memory overflow