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

Fri, 14 Jun 2013 08:02:32 +0200

author
brutisso
date
Fri, 14 Jun 2013 08:02:32 +0200
changeset 5276
0abfeed51c9e
parent 5254
f9709e27a876
child 5277
01522ca68fc7

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

src/share/vm/runtime/arguments.cpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/arguments.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/runtime/arguments.cpp	Fri Jun 14 07:27:22 2013 -0700
     1.2 +++ b/src/share/vm/runtime/arguments.cpp	Fri Jun 14 08:02:32 2013 +0200
     1.3 @@ -1566,6 +1566,15 @@
     1.4    return result;
     1.5  }
     1.6  
     1.7 +void Arguments::set_heap_base_min_address() {
     1.8 +  if (FLAG_IS_DEFAULT(HeapBaseMinAddress) && UseG1GC && HeapBaseMinAddress < 1*G) {
     1.9 +    // By default HeapBaseMinAddress is 2G on all platforms except Solaris x86.
    1.10 +    // G1 currently needs a lot of C-heap, so on Solaris we have to give G1
    1.11 +    // some extra space for the C-heap compared to other collectors.
    1.12 +    FLAG_SET_ERGO(uintx, HeapBaseMinAddress, 1*G);
    1.13 +  }
    1.14 +}
    1.15 +
    1.16  void Arguments::set_heap_size() {
    1.17    if (!FLAG_IS_DEFAULT(DefaultMaxRAMFraction)) {
    1.18      // Deprecated flag
    1.19 @@ -3525,6 +3534,8 @@
    1.20      }
    1.21    }
    1.22  
    1.23 +  set_heap_base_min_address();
    1.24 +
    1.25    // Set heap size based on available physical memory
    1.26    set_heap_size();
    1.27  
     2.1 --- a/src/share/vm/runtime/arguments.hpp	Fri Jun 14 07:27:22 2013 -0700
     2.2 +++ b/src/share/vm/runtime/arguments.hpp	Fri Jun 14 08:02:32 2013 +0200
     2.3 @@ -315,6 +315,8 @@
     2.4    // limits the given memory size by the maximum amount of memory this process is
     2.5    // currently allowed to allocate or reserve.
     2.6    static julong limit_by_allocatable_memory(julong size);
     2.7 +  // Setup HeapBaseMinAddress
     2.8 +  static void set_heap_base_min_address();
     2.9    // Setup heap size
    2.10    static void set_heap_size();
    2.11    // Based on automatic selection criteria, should the

mercurial