What causes a JRE 6 JVM code cache leak?

Posted by Arturo Knight on Stack Overflow See other posts from Stack Overflow or by Arturo Knight
Published on 2009-10-18T21:16:54Z Indexed on 2010/04/16 19:13 UTC
Read the original article Hit count: 552

Filed under:
|
|

Since switching to JRE 6, my server's code cache usage (non-heap) keeps growing indefinitely. My application creates a lot of classes at runtime, BUT these classes are successfully unloaded during the GC process. I can see these classes getting unloaded in the gc logs and also the permGen usage stays constant. I specifically make sure in my code that these classes are orphaned once I am finished with them and so they correctly get garbage collected from permGen.

The code cache however keeps growing. I only became aware of the code cache after switching to JRE 6. So I guess my questions are:

  1. Does GC include the code cache?
  2. What could cause a code cache memory leak, specifically.
  3. Is there a bug in JDK 6 in this area?

© Stack Overflow or respective owner

Related posts about java

Related posts about jvm