883 // be compressed the same as instances. |
883 // be compressed the same as instances. |
884 // Need to round class space size up because it's below the heap and |
884 // Need to round class space size up because it's below the heap and |
885 // the actual alignment depends on its size. |
885 // the actual alignment depends on its size. |
886 Universe::set_class_metaspace_size(align_size_up(ClassMetaspaceSize, alignment)); |
886 Universe::set_class_metaspace_size(align_size_up(ClassMetaspaceSize, alignment)); |
887 size_t total_reserved = align_size_up(heap_size + Universe::class_metaspace_size(), alignment); |
887 size_t total_reserved = align_size_up(heap_size + Universe::class_metaspace_size(), alignment); |
|
888 assert(!UseCompressedOops || (total_reserved <= (OopEncodingHeapMax - os::vm_page_size())), |
|
889 "heap size is too big for compressed oops"); |
888 char* addr = Universe::preferred_heap_base(total_reserved, Universe::UnscaledNarrowOop); |
890 char* addr = Universe::preferred_heap_base(total_reserved, Universe::UnscaledNarrowOop); |
889 |
891 |
890 ReservedHeapSpace total_rs(total_reserved, alignment, UseLargePages, addr); |
892 ReservedHeapSpace total_rs(total_reserved, alignment, UseLargePages, addr); |
891 |
893 |
892 if (UseCompressedOops) { |
894 if (UseCompressedOops) { |