Mercurial > hg > graal-compiler
changeset 8752:82f49e8e2c28
8009614: nsk/split_verifier/stress/ifelse/ifelse002_30 fails with 'assert((size & (granularity - 1)) == 0) failed: size not aligned to os::vm_allocation_granularity()
Summary: Align up vm allocation size to os defined granularity
Reviewed-by: dholmes, coleenp
author | zgu |
---|---|
date | Fri, 15 Mar 2013 11:53:28 -0400 |
parents | 39432a1cefdd |
children | 919a5f9f36a9 |
files | src/share/vm/memory/metaspace.cpp |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/memory/metaspace.cpp Thu Mar 14 00:33:08 2013 -0700 +++ b/src/share/vm/memory/metaspace.cpp Fri Mar 15 11:53:28 2013 -0400 @@ -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