ReservedCodeCacheSize(和
InitialCodeCacheSize)是Java Hotspot
VM的(即时)编译器的选项。基本上,它设置了编译器代码缓存的最大大小。
缓存可能已满,从而导致出现以下警告:
Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled.Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the pre cache size using -XX:ReservedCodeCacheSize=Code Cache [0x000000010958f000, 0x000000010c52f000, 0x000000010c58f000) total_blobs=15406 nmethods=14989 adapters=362 free_pre_cache=835Kb largest_free_block=449792
跟着会变得更糟
Java HotSpot(TM) Client VM warning: Exceptionjava.lang.OutOfMemoryError occurred dispatching signal SIGINT to handler- theVM may need to be forcibly terminated。
何时设置此选项?
- Hotspot编译器出现故障时
- 减少JVM所需的内存(并因此冒着JIT编译器故障的风险)
通常,您不会更改此值。我认为默认值可以很好地平衡,因为仅在极少数情况下(根据我的经验)才会出现此问题。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)