8038422: CDS test failed: assert((size % os::vm_allocation_granularity()) == 0) failed when limiting SharedMiscDataSize
authorminqi
Tue, 27 May 2014 08:44:23 -0700
changeset 24665 51cb5579adb3
parent 24664 f81a7d49de3d
child 24668 26512f82f5d9
child 24679 2ca270b3baf5
child 24826 ad80eed312fc
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
hotspot/src/share/vm/memory/metaspace.cpp
--- a/hotspot/src/share/vm/memory/metaspace.cpp	Fri May 23 21:34:49 2014 +0000
+++ b/hotspot/src/share/vm/memory/metaspace.cpp	Tue May 27 08:44:23 2014 -0700
@@ -3095,7 +3095,7 @@
 
 void Metaspace::global_initialize() {
   // 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;
 
   MetaspaceShared::set_max_alignment(max_alignment);