G1 GC是否具有最大区域大小或最大区域数量?

G1 GC是否具有最大区域大小或最大区域数量?,第1张

G1 GC是否具有最大区域大小或最大区域数量?

从HotSpot
JVM来源

  // Minimum region size; we won't go lower than that.  // We might want to decrease this in the future, to deal with small  // heaps a bit more efficiently.  static const size_t MIN_REGION_SIZE = 1024 * 1024;  // Maximum region size; we don't go higher than that. There's a good  // reason for having an upper bound. We don't want regions to get too  // large, otherwise cleanup's effectiveness would decrease as there  // will be fewer opportunities to find totally empty regions after  // marking.  static const size_t MAX_REGION_SIZE = 32 * 1024 * 1024;  // The automatic region size calculation will try to have around this  // many regions in the heap (based on the min heap size).  static const size_t TARGET_REGION_NUMBER = 2048;
  • MIN_REGION_SIZE
    (1MB)和
    MAX_REGION_SIZE
    (32MB)是硬限制;
  • TARGET_REGION_NUMBER
    如果在JVM选项中未指定默认区域大小,则该提示仅用于计算默认区域大小。实际数字可能超过此值。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5475906.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-12
下一篇 2022-12-12

发表评论

登录后才能评论

评论列表(0条)

保存