Mark-Sweep-Defragment garbage collector does variable stage collection. First, mark sweep, then at the end of extracting free list, decide whether to defragment. Decision is made upon "best effort" condition: no free cells available for requested cell class, and gc can't release new block for the size class. After further calculation of usage data, the following defragment stage starts to reallocate objects from source blocks into destination blocks in the same size class.
Log in to post a comment.