Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/arguments.cpp @ 1966:4110c3e0c50d
Merge
author | iveresov |
---|---|
date | Fri, 19 Nov 2010 17:01:34 -0800 |
parents | 9752a6549f2e 0ac62b4d6507 |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1962:0be53e62c06c | 1966:4110c3e0c50d |
---|---|
1339 } | 1339 } |
1340 return true; | 1340 return true; |
1341 } | 1341 } |
1342 | 1342 |
1343 inline uintx max_heap_for_compressed_oops() { | 1343 inline uintx max_heap_for_compressed_oops() { |
1344 // Heap should be above HeapBaseMinAddress to get zero based compressed oops. | 1344 // Avoid sign flip. |
1345 LP64_ONLY(return OopEncodingHeapMax - MaxPermSize - os::vm_page_size() - HeapBaseMinAddress); | 1345 if (OopEncodingHeapMax < MaxPermSize + os::vm_page_size()) { |
1346 return 0; | |
1347 } | |
1348 LP64_ONLY(return OopEncodingHeapMax - MaxPermSize - os::vm_page_size()); | |
1346 NOT_LP64(ShouldNotReachHere(); return 0); | 1349 NOT_LP64(ShouldNotReachHere(); return 0); |
1347 } | 1350 } |
1348 | 1351 |
1349 bool Arguments::should_auto_select_low_pause_collector() { | 1352 bool Arguments::should_auto_select_low_pause_collector() { |
1350 if (UseAutoGCSelectPolicy && | 1353 if (UseAutoGCSelectPolicy && |
1518 // Limit the heap size to ErgoHeapSizeLimit | 1521 // Limit the heap size to ErgoHeapSizeLimit |
1519 reasonable_max = MIN2(reasonable_max, (julong)ErgoHeapSizeLimit); | 1522 reasonable_max = MIN2(reasonable_max, (julong)ErgoHeapSizeLimit); |
1520 } | 1523 } |
1521 if (UseCompressedOops) { | 1524 if (UseCompressedOops) { |
1522 // Limit the heap size to the maximum possible when using compressed oops | 1525 // Limit the heap size to the maximum possible when using compressed oops |
1523 reasonable_max = MIN2(reasonable_max, (julong)max_heap_for_compressed_oops()); | 1526 julong max_coop_heap = (julong)max_heap_for_compressed_oops(); |
1527 if (HeapBaseMinAddress + MaxHeapSize < max_coop_heap) { | |
1528 // Heap should be above HeapBaseMinAddress to get zero based compressed oops | |
1529 // but it should be not less than default MaxHeapSize. | |
1530 max_coop_heap -= HeapBaseMinAddress; | |
1531 } | |
1532 reasonable_max = MIN2(reasonable_max, max_coop_heap); | |
1524 } | 1533 } |
1525 reasonable_max = os::allocatable_physical_memory(reasonable_max); | 1534 reasonable_max = os::allocatable_physical_memory(reasonable_max); |
1526 | 1535 |
1527 if (!FLAG_IS_DEFAULT(InitialHeapSize)) { | 1536 if (!FLAG_IS_DEFAULT(InitialHeapSize)) { |
1528 // An initial heap size was specified on the command line, | 1537 // An initial heap size was specified on the command line, |