GC之⼗:GC(AllocationFailure)
1、[GC (Allocation Failure) AF
⽰例代码:唏嘘怎么读>什么的山脉
package dxz.jvm.part3;
import urrent.TimeUnit;
/**
* @VM args:-verbo:gc -Xms20m -Xmx20m -Xmn10m -XX:SurvivorRatio=8
* -XX:PretenureSizeThreshold=3145728
* 3145728=3m,所以下⾯的4m直接分配到⽼年代中
* @author lenovo
*
*/
public class GCTest {
private static final int _1MB = 1024 * 1024;
public static void testPretenureSizeThreshold() {
家访目的怎么写byte[] allocation;
allocation = new byte[4 * _1MB];
}
小青蛙折纸电脑连接网络public static void main(String[] args) throws InterruptedException {
春节经常放的纯音乐
TimeUnit.SECONDS.sleep(30);
testPretenureSizeThreshold();
}
}
学说话
结果:
[GC (Allocation Failure) [PSYoungGen: 8192K->1000K(9216K)] 8192K->2064K(19456K), 0.0141635 cs] [Times: ur=0.05 sys=0.00, real=0.01 cs] Heap
PSYoungGen total 9216K, ud 7743K [0x00000000ff600000, 0x0000000100000000, 0x0000000100000000)返途
eden space 8192K, 82% ud [0x00000000ff600000,0x00000000ffc95e98,0x00000000ffe00000)
from space 1024K, 97% ud [0x00000000ffe00000,0x00000000ffefa020,0x00000000fff00000)
to space 1024K, 0% ud [0x00000000fff00000,0x00000000fff00000,0x0000000100000000)
ParOldGen total 10240K, ud 1064K [0x00000000fec00000, 0x00000000ff600000, 0x00000000ff600000)
object space 10240K, 10% ud [0x00000000fec00000,0x00000000fed0a020,0x00000000ff600000)
Metaspace ud 8554K, capacity 8862K, committed 9088K, rerved 1056768K
class space ud 1025K, capacity 1115K, committed 1152K, rerved 1048576K