输出结果 [GC (Allocation Failure) [PSYoungGen: 2006K->503K(2560K)] 2006K->999K(9728K), 0.0010663 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC (Allocation Failure) [PSYoungGen: 2175K->487K(2560K)] 2671K->1999K(9728K), 0.0008205 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC (Allocation Failure) [PSYoungGen: 2160K->248K(2560K)] 3671K->2847K(9728K), 0.0009054 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[Full GC (Ergonomics) [PSYoungGen: 1376K->0K(2560K)] [ParOldGen: 6951K->1718K(7168K)] 8327K->1718K(9728K), [Metaspace: 2566K->2566K(1056768K)], 0.0061908 secs] [Times: user=0.03 sys=0.00, real=0.01 secs]
[GC (Allocation Failure) [PSYoungGen: 1128K->0K(2560K)] 5023K->3894K(9728K), 0.0005362 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC (Allocation Failure) [PSYoungGen: 0K->0K(2560K)] 3894K->3894K(9728K), 0.0005222 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[Full GC (Allocation Failure) [PSYoungGen: 0K->0K(2560K)] [ParOldGen: 3894K->3893K(7168K)] 3894K->3893K(9728K), [Metaspace: 2566K->2566K(1056768K)], 0.0065284 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
[GC (Allocation Failure) [PSYoungGen: 0K->0K(1536K)] 3893K->3893K(8704K), 0.0004282 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[Full GC (Allocation Failure) [PSYoungGen: 0K->0K(1536K)] [ParOldGen: 3893K->3880K(7168K)] 3893K->3880K(8704K), [Metaspace: 2566K->2566K(1056768K)], 0.0068218 secs] [Times: user=0.06 sys=0.00, real=0.01 secs]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuilder.append(Unknown Source)
at TestDemo.main(TestDemo.java:8)
Heap
PSYoungGen total 1536K, used 41K [0x00000000ffd00000, 0x0000000100000000, 0x0000000100000000)
eden space 1024K, 4% used [0x00000000ffd00000,0x00000000ffd0a4c0,0x00000000ffe00000)
from space 512K, 0% used [0x00000000fff80000,0x00000000fff80000,0x0000000100000000)
to space 1024K, 0% used [0x00000000ffe00000,0x00000000ffe00000,0x00000000fff00000)
ParOldGen total 7168K, used 3880K [0x00000000ff600000, 0x00000000ffd00000, 0x00000000ffd00000)
object space 7168K, 54% used [0x00000000ff600000,0x00000000ff9ca078,0x00000000ffd00000)
Metaspace used 2597K, capacity 4486K, committed 4864K, reserved 1056768K
class space used 285K, capacity 386K, committed 512K, reserved 1048576K