8038422: CDS test failed: assert((size % os::vm_allocation_granularity()) == 0) failed when limiting SharedMiscDataSize

Tue, 27 May 2014 08:44:23 -0700

author
minqi
date
Tue, 27 May 2014 08:44:23 -0700
changeset 7297
678a467a733b
parent 7296
c49cd31b6da6
child 7298
ef9eda2c1abe

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

src/share/vm/memory/metaspace.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/memory/metaspace.cpp	Sat Oct 25 21:02:29 2014 -1000
     1.2 +++ b/src/share/vm/memory/metaspace.cpp	Tue May 27 08:44:23 2014 -0700
     1.3 @@ -3141,7 +3141,7 @@
     1.4    MetaspaceGC::initialize();
     1.5  
     1.6    // Initialize the alignment for shared spaces.
     1.7 -  int max_alignment = os::vm_page_size();
     1.8 +  int max_alignment = os::vm_allocation_granularity();
     1.9    size_t cds_total = 0;
    1.10  
    1.11    MetaspaceShared::set_max_alignment(max_alignment);

mercurial