< prev index next >

src/hotspot/share/runtime/arguments.cpp

Print this page




1779                                      " (" SIZE_FORMAT "G) which is greater than value given " SIZE_FORMAT,
1780                                      DefaultHeapBaseMinAddress,
1781                                      DefaultHeapBaseMinAddress/G,
1782                                      HeapBaseMinAddress);
1783           FLAG_SET_ERGO(HeapBaseMinAddress, DefaultHeapBaseMinAddress);
1784         }
1785       }
1786 
1787       if (HeapBaseMinAddress + MaxHeapSize < max_coop_heap) {
1788         // Heap should be above HeapBaseMinAddress to get zero based compressed oops
1789         // but it should be not less than default MaxHeapSize.
1790         max_coop_heap -= HeapBaseMinAddress;
1791       }
1792 
1793       // If user specified flags prioritizing os physical
1794       // memory limits, then disable compressed oops if
1795       // limits exceed max_coop_heap and UseCompressedOops
1796       // was not specified.
1797       if (reasonable_max > max_coop_heap) {
1798         if (FLAG_IS_ERGO(UseCompressedOops) && override_coop_limit) {
1799           log_info(cds)("UseCompressedOops and UseCompressedClassPointers have been disabled due to"
1800             " max heap " SIZE_FORMAT " > compressed oop heap " SIZE_FORMAT ". "
1801             "Please check the setting of MaxRAMPercentage %5.2f."
1802             ,(size_t)reasonable_max, (size_t)max_coop_heap, MaxRAMPercentage);
1803           FLAG_SET_ERGO(UseCompressedOops, false);
1804           FLAG_SET_ERGO(UseCompressedClassPointers, false);
1805         } else {
1806           reasonable_max = MIN2(reasonable_max, max_coop_heap);
1807         }
1808       }
1809     }
1810 #endif // _LP64
1811 
1812     reasonable_max = limit_by_allocatable_memory(reasonable_max);
1813 
1814     if (!FLAG_IS_DEFAULT(InitialHeapSize)) {
1815       // An initial heap size was specified on the command line,
1816       // so be sure that the maximum size is consistent.  Done
1817       // after call to limit_by_allocatable_memory because that
1818       // method might reduce the allocation size.
1819       reasonable_max = MAX2(reasonable_max, (julong)InitialHeapSize);




1779                                      " (" SIZE_FORMAT "G) which is greater than value given " SIZE_FORMAT,
1780                                      DefaultHeapBaseMinAddress,
1781                                      DefaultHeapBaseMinAddress/G,
1782                                      HeapBaseMinAddress);
1783           FLAG_SET_ERGO(HeapBaseMinAddress, DefaultHeapBaseMinAddress);
1784         }
1785       }
1786 
1787       if (HeapBaseMinAddress + MaxHeapSize < max_coop_heap) {
1788         // Heap should be above HeapBaseMinAddress to get zero based compressed oops
1789         // but it should be not less than default MaxHeapSize.
1790         max_coop_heap -= HeapBaseMinAddress;
1791       }
1792 
1793       // If user specified flags prioritizing os physical
1794       // memory limits, then disable compressed oops if
1795       // limits exceed max_coop_heap and UseCompressedOops
1796       // was not specified.
1797       if (reasonable_max > max_coop_heap) {
1798         if (FLAG_IS_ERGO(UseCompressedOops) && override_coop_limit) {
1799           log_info(gc, heap, coops)("UseCompressedOops and UseCompressedClassPointers have been disabled due to"
1800             " max heap " SIZE_FORMAT " > compressed oop heap " SIZE_FORMAT ". "
1801             "Please check the setting of MaxRAMPercentage %5.2f."
1802             ,(size_t)reasonable_max, (size_t)max_coop_heap, MaxRAMPercentage);
1803           FLAG_SET_ERGO(UseCompressedOops, false);
1804           FLAG_SET_ERGO(UseCompressedClassPointers, false);
1805         } else {
1806           reasonable_max = MIN2(reasonable_max, max_coop_heap);
1807         }
1808       }
1809     }
1810 #endif // _LP64
1811 
1812     reasonable_max = limit_by_allocatable_memory(reasonable_max);
1813 
1814     if (!FLAG_IS_DEFAULT(InitialHeapSize)) {
1815       // An initial heap size was specified on the command line,
1816       // so be sure that the maximum size is consistent.  Done
1817       // after call to limit_by_allocatable_memory because that
1818       // method might reduce the allocation size.
1819       reasonable_max = MAX2(reasonable_max, (julong)InitialHeapSize);


< prev index next >