Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/universe.cpp @ 8741:eac371996b44
8001049: VM crashes when running with large -Xms and not specifying ObjectAlignmentInBytes
Summary: Take the initial heap size into account when checking the heap size for compressed oops
Reviewed-by: jmasa, kvn, hseigel, ctornqvi
author | brutisso |
---|---|
date | Tue, 12 Mar 2013 08:33:57 +0100 |
parents | 3c9bc17b9403 |
children | dbd5837b342f |
comparison
equal
deleted
inserted
replaced
8739:ca9580859cf4 | 8741:eac371996b44 |
---|---|
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) { |