Java: How often is the GC executed in JVM? Every second? Every minute? Or is it random depending on the memory size? I just want to have an idea.
Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends on the memory usage and the heap in which the objects are stored. Look at this
http://javarevisited.blogspot.com/2011/04/garbage-collection-in-java.html
It does not depend on time. It only depends on the new memory requirements and available memory.