Questions Specific to System.gc() or Runtime.getRuntime.gc() Calls
(Doc ID 2549527.1)
Last updated on NOVEMBER 14, 2020
Applies to:Java SE JDK and JRE - Version 8 to 8
Information in this document applies to any platform.
- If either System.gc() or Runtime.getRuntime.gc() calls are made, do they "force" a Garbage Collection (GC) or just provide a hint to perform a GC?
- Can the effects of full garbage collections be mitigated by using options such as -XX:+ExplicitGCInvokesConcurrent?
- What can be searched for in the Garbage First Garbage Collector (G1GC or just G1) logs, to determine when a GC was performed as a result of code calling System.gc() or Runtime.getRuntime.gc()?
- If a third party library is suspected of calling System.gc() or Runtime.getRuntime.gc() methods explicitly, what techniques can be used to find out which library is making these calls?
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document