notes on ibm:dw"5 things you didn't know about ... Command-line flags for the JVM"


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.

 

你可能感兴趣的:(jvm,IBM,idea,locking)