java virtual machine (three) space allocation guarantees

In minorGC (garbage collection for the new generation) occur, if old's maximum available contiguous space larger than the new generation of the total space of all objects, then the Minor GC is safe.

The new generation collection algorithm using replication, a survivor space will be used as a backup rotation. But if there is, after minor gc still have a lot of live objects, and greater than the space survivor, then put that can not fit into the old era. Put in at the same time guarantee to do the distribution, that is, itself, there's old space left to accommodate these objects.

But how many will survive the object is not known, only based on past experience to determine whether enough. Not enough to burst fails, after the failure to launch a full gc (garbage collection years old).

Guess you like

Origin blog.csdn.net/xu505928168/article/details/91956896
Recommended