8012265: VM often crashes on solaris with a lot of memory

Increase HeapBaseMinAddress for G1 from 256m to 1g on Solaris x86

Reviewed-by: mgerdin, coleenp, kvn
This commit is contained in:
Bengt Rutisson 2013-06-14 08:02:32 +02:00
parent a8616cb1c2
commit f18e968d43
2 changed files with 13 additions and 0 deletions

View file

@ -1566,6 +1566,15 @@ julong Arguments::limit_by_allocatable_memory(julong limit) {
return result;
}
void Arguments::set_heap_base_min_address() {
if (FLAG_IS_DEFAULT(HeapBaseMinAddress) && UseG1GC && HeapBaseMinAddress < 1*G) {
// By default HeapBaseMinAddress is 2G on all platforms except Solaris x86.
// G1 currently needs a lot of C-heap, so on Solaris we have to give G1
// some extra space for the C-heap compared to other collectors.
FLAG_SET_ERGO(uintx, HeapBaseMinAddress, 1*G);
}
}
void Arguments::set_heap_size() {
if (!FLAG_IS_DEFAULT(DefaultMaxRAMFraction)) {
// Deprecated flag
@ -3525,6 +3534,8 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
}
}
set_heap_base_min_address();
// Set heap size based on available physical memory
set_heap_size();