Label cleaning algorithm
Garbage collection mechanism strategy
1. Concept
It is divided into two stages: first, all the objects that need to be recycled are marked, and then all the marked objects are recycled uniformly.
Shortcoming
The main results are as follows: 1. The efficiency of marking phase and clearing phase is not high.
2. It is obvious that a large number of discontinuous memory fragments are produced after the cleanup, so that when the program needs to allocate larger objects, it is unable to find enough continuous memory and has to trigger a garbage collection action in advance.