comparison src/share/vm/memory/metaspace.cpp @ 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 3efdfd6ddbf2
children 82ab039b9680
comparison
equal deleted inserted replaced
8750:39432a1cefdd 8752:82f49e8e2c28
332 void print_on(outputStream* st) const; 332 void print_on(outputStream* st) const;
333 }; 333 };
334 334
335 // byte_size is the size of the associated virtualspace. 335 // byte_size is the size of the associated virtualspace.
336 VirtualSpaceNode::VirtualSpaceNode(size_t byte_size) : _top(NULL), _next(NULL), _rs(0) { 336 VirtualSpaceNode::VirtualSpaceNode(size_t byte_size) : _top(NULL), _next(NULL), _rs(0) {
337 // align up to vm allocation granularity
338 byte_size = align_size_up(byte_size, os::vm_allocation_granularity());
339
337 // This allocates memory with mmap. For DumpSharedspaces, allocate the 340 // This allocates memory with mmap. For DumpSharedspaces, allocate the
338 // space at low memory so that other shared images don't conflict. 341 // space at low memory so that other shared images don't conflict.
339 // This is the same address as memory needed for UseCompressedOops but 342 // This is the same address as memory needed for UseCompressedOops but
340 // compressed oops don't work with CDS (offsets in metadata are wrong), so 343 // compressed oops don't work with CDS (offsets in metadata are wrong), so
341 // borrow the same address. 344 // borrow the same address.