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. |