I recently encountered a JIT error: Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled.
This caused my application to run slowly. My JDK version is Oracle JDK1.7.0_79. The default CodeCache size is 48m and I modified the size with -XX:ReservedCodeCacheSize=256M. But I don't know when CodeCache was recycled. Does anyone know?
Asked
Active
Viewed 511 times
0

Alder
- 1
-
I suppose, de-optimization and class unloading may allow reclaiming of code cache parts, but nothing else. – Holger May 28 '18 at 10:15
-
Possible duplicate of [JVM Compile Time vs Code Cache](https://stackoverflow.com/questions/51316215/jvm-compile-time-vs-code-cache) – Holger Apr 25 '19 at 10:03
-
Post Java8, the code cache was segmented. So you might need adjust the XX:NonNMethodCodeHeapSize, XX:ProfiledCodeHeapSize or XX:NonProfiledCodeHeapSize . Details here: https://devtechfactory.com/blogs/java-performance-role-of-codecache – deadzg_devil Sep 18 '21 at 00:57