I'm trying to understand the working principle of grabage collection algorithms. I'm reading this article. As far as I understood each allocation is happening in Young generation. If there is not enough free space available Minor GC
is triggered to clean the Young generation (Eden, S1, S2). But now imagine we have some class like:
public class TestYoungCrash{
private long l1;
private long l2;
//...
private long l100000000;
//tons of other fields
}
So the object of the class does not fit to young generation even if the generation is completely clear.
What's gonna happen then? Is it standardized?