8038422: CDS test failed: assert((size % os::vm_allocation_granularity()) == 0) failed when limiting SharedMiscDataSize
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
This commit is contained in:
parent
854f5afca7
commit
49c3c35a14
@ -3095,7 +3095,7 @@ void Metaspace::ergo_initialize() {
|
|||||||
|
|
||||||
void Metaspace::global_initialize() {
|
void Metaspace::global_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);
|
||||||
|
Loading…
Reference in New Issue
Block a user