Java advanced communication group
37341439 there is no lower limit, no discrimination, and cheerful communication ~
1: reference counting method (Classic, ancient)
An object references count + 1. When count is 0, it is recycled. When a references B and B references a, it cannot be recycled. Therefore, the Java garbage collector does not use thisAlgorithm. 2: Mark-clear algorithm disadvantages: as a result, space fragments can be found from the root node to find all reachable objects, and then all unreachable objects are cleared, which may lead to many discontinuous spaces, resulting in space waste. 3: the replication algorithm is applicable to the scenarios where there are many spam objects and few surviving objects. The new generation applies this algorithm; it is highly efficient, but requires a memory of half 4: The tag-compression algorithm is used in the old age to find all reachable objects from the root node, then, the reachable objects are moved to the continuous memory space, and all reachable objects are cleared. This ensures the continuity of memory. 5: Other algorithms of the incremental algorithm process garbage at a time. If the processing time is long, it will pause for a long time. This algorithm is applicable to garbage collection threads and applications.ProgramThe thread is switched to avoid a long system pause. However, the context switching is consumed due to thread switching, and the total recovery costs increase. 6: The generation algorithm uses the replication algorithm in the new generation. In the old generation, the labeled compression algorithm is used by the garbage collector;