[英]difference between new generation and tenured generation in Heap
I have read that new generation stores newly created objects while tenured generation stores object which survives.我读过新一代存储新创建的对象,而老一代存储存活的对象。 But I have a doubt that how will compiler know that particular object will survive or not?但我怀疑编译器如何知道特定对象是否会存活? When will it put particular object in tenured generation?什么时候将特定对象放入年老代? Please guide me.请指导我。
The young generation is divided into 3 spaces.年轻代分为3个空间。
There are 3 spaces in total, two of which are Survivor spaces.总共有3个空间,其中两个是Survivor空间。 The order of execution process of each space is as below:每个空间的执行过程顺序如下:
The information is taken from this article .信息取自这篇文章。 I'd suggest to read it for deeper understanding.我建议阅读它以加深理解。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.