Reference counting method
Mark Clear Method
Copy method (new generation, suitable for many garbage objects, fewer surviving objects)
Tag compression method (old age) equivalent to the tag cleanup algorithm + memory defragmentation
Strong references,
Soft references (SoftReference), which are reclaimed when heap space is low, and soft references do not cause memory overflow
Weak references (weakreference), found to be recycled
Virtual reference
Garbage collector:
Serial collector:-XX:+USESERIALGC
Disable System.GC ()
Maximum age for Cenozoic objects:-xx:maxtenuringthreshold=15 default is 15, which means up to 15 recoveries into the old age.
The default value of--XX:TARGETSURVIVORRATIO=50 is 50, which indicates that the survivor zone has more than 50% usage after GC, and may use a smaller age as a promotion, rather than maxtenuringthreshold=15
Tlab Enabled:-xx:+usetlab
Direct Memory Request: bytebuffer.allocatedirect (int)
Parameter settings:-xx:maxdirectmemorysize
Method Area (permanent area):-xx:maxpermsize=5m
JVM Garbage Collection