Mercurial > hg > truffle
comparison src/share/vm/memory/metaspace.cpp @ 20583:678a467a733b
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
author | minqi |
---|---|
date | Tue, 27 May 2014 08:44:23 -0700 |
parents | b509b7ff561c |
children | 03e6d34be1f5 |
comparison
equal
deleted
inserted
replaced
20582:c49cd31b6da6 | 20583:678a467a733b |
---|---|
3139 | 3139 |
3140 void Metaspace::global_initialize() { | 3140 void Metaspace::global_initialize() { |
3141 MetaspaceGC::initialize(); | 3141 MetaspaceGC::initialize(); |
3142 | 3142 |
3143 // Initialize the alignment for shared spaces. | 3143 // Initialize the alignment for shared spaces. |
3144 int max_alignment = os::vm_page_size(); | 3144 int max_alignment = os::vm_allocation_granularity(); |
3145 size_t cds_total = 0; | 3145 size_t cds_total = 0; |
3146 | 3146 |
3147 MetaspaceShared::set_max_alignment(max_alignment); | 3147 MetaspaceShared::set_max_alignment(max_alignment); |
3148 | 3148 |
3149 if (DumpSharedSpaces) { | 3149 if (DumpSharedSpaces) { |