< prev index next >
src/share/vm/runtime/arguments.cpp
Print this page
*** 1783,1792 ****
--- 1783,1805 ----
set_client_compilation_mode();
}
}
#endif //TIERED
+ void Arguments::set_heap_base_min_address() {
+ #if defined(SOLARIS)
+ // can safely use 1g of c heap for Direct Memory Buffer,
+ // rest can be used by java needs, 1g on amd64, 5g on sparcv9
+ // only when HeapBaseMinAddress is not set manually
+ if (UseCompressedOops && FLAG_IS_CMDLINE(MaxDirectMemorySize) && !FLAG_IS_CMDLINE(HeapBaseMinAddress)) {
+ if (MaxDirectMemorySize > 1 * G) {
+ FLAG_SET_ERGO(size_t, HeapBaseMinAddress, MaxDirectMemorySize + HeapBaseMinAddress - 1 * G);
+ }
+ }
+ #endif
+ }
+
void Arguments::select_gc_ergonomically() {
#if INCLUDE_ALL_GCS
if (os::is_server_class_machine()) {
FLAG_SET_ERGO_IF_DEFAULT(bool, UseG1GC, true);
} else {
*** 1871,1880 ****
--- 1884,1897 ----
// set_use_compressed_klass_ptrs() must be called after calling
// set_use_compressed_oops().
set_use_compressed_klass_ptrs();
+ // check that HeapBaseMinAddress doesn't limit memory allocations for
+ // direct memory buffer on solaris
+ set_heap_base_min_address();
+
// Also checks that certain machines are slower with compressed oops
// in vm_version initialization code.
#endif // _LP64
#endif // !ZERO
< prev index next >