comparison src/share/vm/memory/universe.cpp @ 12233:40136aa2cdb1

8010722: assert: failed: heap size is too big for compressed oops Summary: Use conservative assumptions of required alignment for the various garbage collector components into account when determining the maximum heap size that supports compressed oops. Using this conservative value avoids several circular dependencies in the calculation. Reviewed-by: stefank, dholmes
author tschatzl
date Wed, 11 Sep 2013 16:25:02 +0200
parents 7944aba7ba41
children 23ae5a04724d
comparison
equal deleted inserted replaced
12230:040895ec3920 12233:40136aa2cdb1
870 } 870 }
871 871
872 872
873 // Reserve the Java heap, which is now the same for all GCs. 873 // Reserve the Java heap, which is now the same for all GCs.
874 ReservedSpace Universe::reserve_heap(size_t heap_size, size_t alignment) { 874 ReservedSpace Universe::reserve_heap(size_t heap_size, size_t alignment) {
875 assert(alignment <= Arguments::conservative_max_heap_alignment(),
876 err_msg("actual alignment "SIZE_FORMAT" must be within maximum heap alignment "SIZE_FORMAT,
877 alignment, Arguments::conservative_max_heap_alignment()));
875 size_t total_reserved = align_size_up(heap_size, alignment); 878 size_t total_reserved = align_size_up(heap_size, alignment);
876 assert(!UseCompressedOops || (total_reserved <= (OopEncodingHeapMax - os::vm_page_size())), 879 assert(!UseCompressedOops || (total_reserved <= (OopEncodingHeapMax - os::vm_page_size())),
877 "heap size is too big for compressed oops"); 880 "heap size is too big for compressed oops");
878 881
879 bool use_large_pages = UseLargePages && is_size_aligned(alignment, os::large_page_size()); 882 bool use_large_pages = UseLargePages && is_size_aligned(alignment, os::large_page_size());