[main] INFO com.code.concurrent.Client - Fruit: Fruit{name='小芒果'} [Finalizer] INFO com.code.concurrent.Fruit - 小芒果finalize ! [GC (System.gc()) [PSYoungGen: 5242K->752K(76288K)] 5242K->760K(251392K), 0.0008122 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] [Full GC (System.gc()) [PSYoungGen: 752K->0K(76288K)] [ParOldGen: 8K->534K(175104K)] 760K->534K(251392K), [Metaspace: 3371K->3371K(1056768K)], 0.0042356 secs] [Times: user=0.03 sys=0.00, real=0.00 secs] [main] INFO com.code.concurrent.Client - Fruit is Cleared Heap PSYoungGen total 76288K, used 7209K [0x000000076ab00000, 0x0000000770000000, 0x00000007c0000000) eden space 65536K, 11% used [0x000000076ab00000,0x000000076b20a738,0x000000076eb00000) from space 10752K, 0% used [0x000000076eb00000,0x000000076eb00000,0x000000076f580000) to space 10752K, 0% used [0x000000076f580000,0x000000076f580000,0x0000000770000000) ParOldGen total 175104K, used 534K [0x00000006c0000000, 0x00000006cab00000, 0x000000076ab00000) object space 175104K, 0% used [0x00000006c0000000,0x00000006c0085bf8,0x00000006cab00000) Metaspace used 3857K, capacity 4704K, committed 4864K, reserved 1056768K class space used 428K, capacity 464K, committed 512K, reserved 1048576K
[main] INFO com.code.concurrent.Client - Fruit 对象信息: Fruit{name='小芒果'} [main] INFO com.code.concurrent.Client - GC 前 [main] INFO com.code.concurrent.Client - 没有回收被弱引用的对象,不会加入队列中 [main] INFO com.code.concurrent.Client - 弱引用对象地址:com.code.concurrent.Client$Animal@a09ee92 [main] INFO com.code.concurrent.Client - GC 中 [Finalizer] INFO com.code.concurrent.Fruit - 小芒果finalize ! [GC (System.gc()) [PSYoungGen: 5242K->736K(76288K)] 5242K->744K(251392K), 0.0006983 secs] [Times: user=0.00 sys=0.01, real=0.00 secs] [Full GC (System.gc()) [PSYoungGen: 736K->0K(76288K)] [ParOldGen: 8K->535K(175104K)] 744K->535K(251392K), [Metaspace: 3380K->3380K(1056768K)], 0.0035821 secs] [Times: user=0.02 sys=0.00, real=0.00 secs] [main] INFO com.code.concurrent.Client - GC 后 [main] INFO com.code.concurrent.Client - Fruit is Cleared [main] INFO com.code.concurrent.Client - 回收被弱引用的对象,弱引用对象加入队列中,地址为:com.code.concurrent.Client$Animal@a09ee92 Heap PSYoungGen total 76288K, used 7209K [0x000000076ab00000, 0x0000000770000000, 0x00000007c0000000) eden space 65536K, 11% used [0x000000076ab00000,0x000000076b20a738,0x000000076eb00000) from space 10752K, 0% used [0x000000076eb00000,0x000000076eb00000,0x000000076f580000) to space 10752K, 0% used [0x000000076f580000,0x000000076f580000,0x0000000770000000) ParOldGen total 175104K, used 535K [0x00000006c0000000, 0x00000006cab00000, 0x000000076ab00000) object space 175104K, 0% used [0x00000006c0000000,0x00000006c0085e60,0x00000006cab00000) Metaspace used 3856K, capacity 4704K, committed 4864K, reserved 1056768K class space used 428K, capacity 464K, committed 512K, reserved 1048576K