src/share/vm/runtime/arguments.cpp

changeset 6240
9b4ce069642e
parent 5650
bb57d48691f5
child 5683
621eda7235d2
child 5694
7944aba7ba41
child 5727
ae3e68933caf
equal deleted inserted replaced
6239:2a907fd129cb 6240:9b4ce069642e
1603 result = MIN2(result, max_allocatable / MaxVirtMemFraction); 1603 result = MIN2(result, max_allocatable / MaxVirtMemFraction);
1604 } 1604 }
1605 return result; 1605 return result;
1606 } 1606 }
1607 1607
1608 void Arguments::set_heap_base_min_address() {
1609 if (FLAG_IS_DEFAULT(HeapBaseMinAddress) && UseG1GC && HeapBaseMinAddress < 1*G) {
1610 // By default HeapBaseMinAddress is 2G on all platforms except Solaris x86.
1611 // G1 currently needs a lot of C-heap, so on Solaris we have to give G1
1612 // some extra space for the C-heap compared to other collectors.
1613 // Use FLAG_SET_DEFAULT here rather than FLAG_SET_ERGO to make sure that
1614 // code that checks for default values work correctly.
1615 FLAG_SET_DEFAULT(HeapBaseMinAddress, 1*G);
1616 }
1617 }
1618
1619 void Arguments::set_heap_size() { 1608 void Arguments::set_heap_size() {
1620 if (!FLAG_IS_DEFAULT(DefaultMaxRAMFraction)) { 1609 if (!FLAG_IS_DEFAULT(DefaultMaxRAMFraction)) {
1621 // Deprecated flag 1610 // Deprecated flag
1622 FLAG_SET_CMDLINE(uintx, MaxRAMFraction, DefaultMaxRAMFraction); 1611 FLAG_SET_CMDLINE(uintx, MaxRAMFraction, DefaultMaxRAMFraction);
1623 } 1612 }
2228 // 8K is well beyond the reasonable HW cache line size, even with the 2217 // 8K is well beyond the reasonable HW cache line size, even with the
2229 // aggressive prefetching, while still leaving the room for segregating 2218 // aggressive prefetching, while still leaving the room for segregating
2230 // among the distinct pages. 2219 // among the distinct pages.
2231 if (ContendedPaddingWidth < 0 || ContendedPaddingWidth > 8192) { 2220 if (ContendedPaddingWidth < 0 || ContendedPaddingWidth > 8192) {
2232 jio_fprintf(defaultStream::error_stream(), 2221 jio_fprintf(defaultStream::error_stream(),
2233 "ContendedPaddingWidth=" INTX_FORMAT " must be the between %d and %d\n", 2222 "ContendedPaddingWidth=" INTX_FORMAT " must be in between %d and %d\n",
2234 ContendedPaddingWidth, 0, 8192); 2223 ContendedPaddingWidth, 0, 8192);
2235 status = false; 2224 status = false;
2236 } 2225 }
2237 2226
2238 // Need to enforce the padding not to break the existing field alignments. 2227 // Need to enforce the padding not to break the existing field alignments.
2239 // It is sufficient to check against the largest type size. 2228 // It is sufficient to check against the largest type size.
2240 if ((ContendedPaddingWidth % BytesPerLong) != 0) { 2229 if ((ContendedPaddingWidth % BytesPerLong) != 0) {
2241 jio_fprintf(defaultStream::error_stream(), 2230 jio_fprintf(defaultStream::error_stream(),
2242 "ContendedPaddingWidth=" INTX_FORMAT " must be the multiple of %d\n", 2231 "ContendedPaddingWidth=" INTX_FORMAT " must be a multiple of %d\n",
2243 ContendedPaddingWidth, BytesPerLong); 2232 ContendedPaddingWidth, BytesPerLong);
2244 status = false; 2233 status = false;
2245 } 2234 }
2246 2235
2247 // Check lower bounds of the code cache 2236 // Check lower bounds of the code cache
3535 vm_exit_during_initialization( 3524 vm_exit_during_initialization(
3536 "Incompatible compilation policy selected", NULL); 3525 "Incompatible compilation policy selected", NULL);
3537 } 3526 }
3538 } 3527 }
3539 3528
3540 set_heap_base_min_address();
3541
3542 // Set heap size based on available physical memory 3529 // Set heap size based on available physical memory
3543 set_heap_size(); 3530 set_heap_size();
3544 3531
3545 #if INCLUDE_ALL_GCS 3532 #if INCLUDE_ALL_GCS
3546 // Set per-collector flags 3533 // Set per-collector flags

mercurial