comparison src/share/vm/runtime/arguments.cpp @ 10990:0abfeed51c9e

8012265: VM often crashes on solaris with a lot of memory Summary: Increase HeapBaseMinAddress for G1 from 256m to 1g on Solaris x86 Reviewed-by: mgerdin, coleenp, kvn
author brutisso
date Fri, 14 Jun 2013 08:02:32 +0200
parents c07dd9be16e8
children b88209cf98c0
comparison
equal deleted inserted replaced
10968:f9709e27a876 10990:0abfeed51c9e
1562 julong result = limit; 1562 julong result = limit;
1563 if (os::has_allocatable_memory_limit(&max_allocatable)) { 1563 if (os::has_allocatable_memory_limit(&max_allocatable)) {
1564 result = MIN2(result, max_allocatable / MaxVirtMemFraction); 1564 result = MIN2(result, max_allocatable / MaxVirtMemFraction);
1565 } 1565 }
1566 return result; 1566 return result;
1567 }
1568
1569 void Arguments::set_heap_base_min_address() {
1570 if (FLAG_IS_DEFAULT(HeapBaseMinAddress) && UseG1GC && HeapBaseMinAddress < 1*G) {
1571 // By default HeapBaseMinAddress is 2G on all platforms except Solaris x86.
1572 // G1 currently needs a lot of C-heap, so on Solaris we have to give G1
1573 // some extra space for the C-heap compared to other collectors.
1574 FLAG_SET_ERGO(uintx, HeapBaseMinAddress, 1*G);
1575 }
1567 } 1576 }
1568 1577
1569 void Arguments::set_heap_size() { 1578 void Arguments::set_heap_size() {
1570 if (!FLAG_IS_DEFAULT(DefaultMaxRAMFraction)) { 1579 if (!FLAG_IS_DEFAULT(DefaultMaxRAMFraction)) {
1571 // Deprecated flag 1580 // Deprecated flag
3523 vm_exit_during_initialization( 3532 vm_exit_during_initialization(
3524 "Incompatible compilation policy selected", NULL); 3533 "Incompatible compilation policy selected", NULL);
3525 } 3534 }
3526 } 3535 }
3527 3536
3537 set_heap_base_min_address();
3538
3528 // Set heap size based on available physical memory 3539 // Set heap size based on available physical memory
3529 set_heap_size(); 3540 set_heap_size();
3530 3541
3531 #if INCLUDE_ALL_GCS 3542 #if INCLUDE_ALL_GCS
3532 // Set per-collector flags 3543 // Set per-collector flags