提交 ed017d51 编写于 作者: M minqi

8038422: CDS test failed: assert((size % os::vm_allocation_granularity()) ==...

8038422: CDS test failed: assert((size % os::vm_allocation_granularity()) == 0) failed when limiting SharedMiscDataSize
Summary: In debug version, the assert is against os::vm_allocation_granularity(), but in initialization, we use os::vm_page_size() to align the allocation size. In windows, _vm_page_size and _vm_allocation_granularity may not be same. In debug version, the assert is against os::vm_allocation_granularity(), but in initialization, we use os::vm_page_size() to align the allocation size. In windows, _vm_page_size and _vm_allocation_granularity may not be same.
Reviewed-by: dholmes, iklam, jiangli, coleenp
Contributed-by: yumin.qi@oracle.com
上级 3fb36bcf
...@@ -3141,7 +3141,7 @@ void Metaspace::global_initialize() { ...@@ -3141,7 +3141,7 @@ void Metaspace::global_initialize() {
MetaspaceGC::initialize(); MetaspaceGC::initialize();
// Initialize the alignment for shared spaces. // Initialize the alignment for shared spaces.
int max_alignment = os::vm_page_size(); int max_alignment = os::vm_allocation_granularity();
size_t cds_total = 0; size_t cds_total = 0;
MetaspaceShared::set_max_alignment(max_alignment); MetaspaceShared::set_max_alignment(max_alignment);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册