size_t CollectorPolicy::compute_heap_alignment() {
// The card marking array and the offset arrays for old generations are
// committed in os pages as well. Make sure they are entirely full (to
// avoid partial page problems), e.g. if 512 bytes heap corresponds to 1
// byte entry and the os page size is 4096, the maximum heap size should
// be 512*4096 = 2MB aligned. // There is only the GenRemSet in Hotspot and only the GenRemSet::CardTable
// is supported.
// Requirements of any new remembered set implementations must be added here.
size_t alignment = GenRemSet::max_alignment_constraint(GenRemSet::CardTable); // Parallel GC does its own alignment of the generations to avoid requiring a
// large page (256M on some platforms) for the permanent generation. The
// other collectors should also be updated to do their own alignment and then
// this use of lcm() should be removed.
if (UseLargePages && !UseParallelGC) {
// in presence of large pages we have to make sure that our
// alignment is large page aware
alignment = lcm(os::large_page_size(), alignment);
} return alignment;
}

原因堆被划了一个个card page。

512个card page 便是一个Card Table。

这里假设:一个Card Page的是一个card table 的entry 与一个对应的操作系统内存页是4KB

一个Card Table 总体堆内存最大的size便是 512个(Card Page)*4k(系统内存页)=2MB的内存

最新文章

  1. WPF面试准备
  2. Matlab学习笔记 figure函数
  3. spark spark ziliao important
  4. Android开发艺术探索笔记—— View(一)
  5. AS3.0的动态类和密封类
  6. SQL*Net message from client
  7. ACM2096_小明A+B
  8. iOS开发之动画编程的几种方法
  9. Windows Phone 8初学者开发—第4部分:XAML简介
  10. (二)----HTTP请求头与响应头
  11. .Net配置错误页
  12. bean的作用域 :singleton和prototype
  13. arcgis 制图-插值图
  14. 【Python】将对象存成json文件及从json取出对象
  15. Intellij Idea免费激活方法
  16. Mysql加锁处理分析-基于InnoDB存储引擎
  17. vux配置i18n
  18. PHP处理session跨域
  19. Code Review: 超越“审、查、评”的代码回顾
  20. PL/SQL 03 流程控制

热门文章

  1. 分享自己亲测过的Visualstudio 2019中开发Typescript时,设置自动编译生成js,无需手工运行命令生成的方法。
  2. Educational Codeforces Round 141 (Rated for Div. 2) A-E
  3. 【RocketMQ】消息拉模式分析
  4. linux环境编程(2): 使用pipe完成进程间通信
  5. vue中wowjs的使用
  6. centos7连接WIFI
  7. 【C++ 泛型编程01:模板】函数模板与类模板
  8. Java8Stream流
  9. 【一句话】CAP原则
  10. 样本熵(SampEn)的C/C++代码实现与优化