Merge
authorzgu
Fri, 15 Mar 2013 17:12:17 -0700
changeset 16354 369d42f431d6
parent 16352 1ff72c6eaa70 (current diff)
parent 16353 d9984db1bba2 (diff)
child 16355 f4d5aba63f4e
Merge
--- a/hotspot/src/share/vm/memory/metaspace.cpp	Fri Mar 15 17:24:40 2013 -0400
+++ b/hotspot/src/share/vm/memory/metaspace.cpp	Fri Mar 15 17:12:17 2013 -0700
@@ -334,6 +334,9 @@
 
   // byte_size is the size of the associated virtualspace.
 VirtualSpaceNode::VirtualSpaceNode(size_t byte_size) : _top(NULL), _next(NULL), _rs(0) {
+  // align up to vm allocation granularity
+  byte_size = align_size_up(byte_size, os::vm_allocation_granularity());
+
   // This allocates memory with mmap.  For DumpSharedspaces, allocate the
   // space at low memory so that other shared images don't conflict.
   // This is the same address as memory needed for UseCompressedOops but