# HG changeset patch # User zgu # Date 1363392737 25200 # Node ID 919a5f9f36a95929f66e2850b36094963b2179b9 # Parent 1fc4d4768b90599c7a5fbf60fd4b4272e6bef67e# Parent 82f49e8e2c2858a21027b67b0d93eceaf2fbd883 Merge diff -r 1fc4d4768b90 -r 919a5f9f36a9 src/share/vm/memory/metaspace.cpp --- a/src/share/vm/memory/metaspace.cpp Fri Mar 15 17:24:40 2013 -0400 +++ b/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