article original address:http://www.ibm.com/developerworks/java/library/j-5things11/index.html
DisableExplicitGC flag
Explicit garbage collection is a really bad idea -- sometimes on the order of locking youreself in a phone booth with a rabid pit bull.
System.gc()forces the VM to do a full sweeper of the heap, even if one isn't necessary. Full sweeps are typically serveral orders of magnitude more.
The +DisableExplicitGC flag automatically turns a System.gcc() call into a no-op, giving you the opportunity to run your code and see for yourself whether System.gc() has helped or harmed the overall execution of JVM.
HeapDumpOnOutOfMemoryError
The +HeapDumpOnOutOfMemoryError flag let VM catch a snapshot of heap right as the VM on its dying breath.
本文介绍如何使用+DisableExplicitGC标志将System.gc()调用转换为无操作,评估其对JVM整体执行的影响,并探讨+HeapDumpOnOutOfMemoryError标志如何在VM即将崩溃时捕获堆快照。
1266

被折叠的 条评论
为什么被折叠?



