< prev index next >

src/share/vm/memory/universe.cpp

Print this page




 795 
 796   st->print(", Compressed Oops mode: %s", narrow_oop_mode_to_string(narrow_oop_mode()));
 797 
 798   if (Universe::narrow_oop_base() != 0) {
 799     st->print(": " PTR_FORMAT, p2i(Universe::narrow_oop_base()));
 800   }
 801 
 802   if (Universe::narrow_oop_shift() != 0) {
 803     st->print(", Oop shift amount: %d", Universe::narrow_oop_shift());
 804   }
 805 
 806   if (!Universe::narrow_oop_use_implicit_null_checks()) {
 807     st->print(", no protected page in front of the heap");
 808   }
 809   st->cr();
 810 }
 811 
 812 ReservedSpace Universe::reserve_heap(size_t heap_size, size_t alignment) {
 813 
 814   assert(alignment <= Arguments::conservative_max_heap_alignment(),
 815       err_msg("actual alignment " SIZE_FORMAT " must be within maximum heap alignment " SIZE_FORMAT,
 816           alignment, Arguments::conservative_max_heap_alignment()));
 817 
 818   size_t total_reserved = align_size_up(heap_size, alignment);
 819   assert(!UseCompressedOops || (total_reserved <= (OopEncodingHeapMax - os::vm_page_size())),
 820       "heap size is too big for compressed oops");
 821 
 822   bool use_large_pages = UseLargePages && is_size_aligned(alignment, os::large_page_size());
 823   assert(!UseLargePages
 824       || UseParallelGC
 825       || use_large_pages, "Wrong alignment to use large pages");
 826 
 827   // Now create the space.
 828   ReservedHeapSpace total_rs(total_reserved, alignment, use_large_pages);
 829 
 830   if (total_rs.is_reserved()) {
 831     assert((total_reserved == total_rs.size()) && ((uintptr_t)total_rs.base() % alignment == 0),
 832            "must be exactly of required size and alignment");
 833     // We are good.
 834 
 835     if (UseCompressedOops) {
 836       // Universe::initialize_heap() will reset this to NULL if unscaled




 795 
 796   st->print(", Compressed Oops mode: %s", narrow_oop_mode_to_string(narrow_oop_mode()));
 797 
 798   if (Universe::narrow_oop_base() != 0) {
 799     st->print(": " PTR_FORMAT, p2i(Universe::narrow_oop_base()));
 800   }
 801 
 802   if (Universe::narrow_oop_shift() != 0) {
 803     st->print(", Oop shift amount: %d", Universe::narrow_oop_shift());
 804   }
 805 
 806   if (!Universe::narrow_oop_use_implicit_null_checks()) {
 807     st->print(", no protected page in front of the heap");
 808   }
 809   st->cr();
 810 }
 811 
 812 ReservedSpace Universe::reserve_heap(size_t heap_size, size_t alignment) {
 813 
 814   assert(alignment <= Arguments::conservative_max_heap_alignment(),
 815          "actual alignment " SIZE_FORMAT " must be within maximum heap alignment " SIZE_FORMAT,
 816          alignment, Arguments::conservative_max_heap_alignment());
 817 
 818   size_t total_reserved = align_size_up(heap_size, alignment);
 819   assert(!UseCompressedOops || (total_reserved <= (OopEncodingHeapMax - os::vm_page_size())),
 820       "heap size is too big for compressed oops");
 821 
 822   bool use_large_pages = UseLargePages && is_size_aligned(alignment, os::large_page_size());
 823   assert(!UseLargePages
 824       || UseParallelGC
 825       || use_large_pages, "Wrong alignment to use large pages");
 826 
 827   // Now create the space.
 828   ReservedHeapSpace total_rs(total_reserved, alignment, use_large_pages);
 829 
 830   if (total_rs.is_reserved()) {
 831     assert((total_reserved == total_rs.size()) && ((uintptr_t)total_rs.base() % alignment == 0),
 832            "must be exactly of required size and alignment");
 833     // We are good.
 834 
 835     if (UseCompressedOops) {
 836       // Universe::initialize_heap() will reset this to NULL if unscaled


< prev index next >