Mercurial > hg > truffle
comparison src/share/vm/runtime/arguments.cpp @ 13059:46d7652b223c
8026853: Prepare GC code for collector policy regression fix
Summary: Cleanup related to the NewSize and MaxNewSize bugs
Reviewed-by: tschatzl, jcoomes, ehelin
author | jwilhelm |
---|---|
date | Mon, 21 Oct 2013 18:56:20 +0200 |
parents | 3b3133d93fb6 |
children | 8f07aa079343 |
comparison
equal
deleted
inserted
replaced
13058:3aee6bc29547 | 13059:46d7652b223c |
---|---|
1406 // We need to fit both the NULL page and the heap into the memory budget, while | 1406 // We need to fit both the NULL page and the heap into the memory budget, while |
1407 // keeping alignment constraints of the heap. To guarantee the latter, as the | 1407 // keeping alignment constraints of the heap. To guarantee the latter, as the |
1408 // NULL page is located before the heap, we pad the NULL page to the conservative | 1408 // NULL page is located before the heap, we pad the NULL page to the conservative |
1409 // maximum alignment that the GC may ever impose upon the heap. | 1409 // maximum alignment that the GC may ever impose upon the heap. |
1410 size_t displacement_due_to_null_page = align_size_up_(os::vm_page_size(), | 1410 size_t displacement_due_to_null_page = align_size_up_(os::vm_page_size(), |
1411 Arguments::conservative_max_heap_alignment()); | 1411 _conservative_max_heap_alignment); |
1412 | 1412 |
1413 LP64_ONLY(return OopEncodingHeapMax - displacement_due_to_null_page); | 1413 LP64_ONLY(return OopEncodingHeapMax - displacement_due_to_null_page); |
1414 NOT_LP64(ShouldNotReachHere(); return 0); | 1414 NOT_LP64(ShouldNotReachHere(); return 0); |
1415 } | 1415 } |
1416 | 1416 |
2679 jio_fprintf(defaultStream::error_stream(), | 2679 jio_fprintf(defaultStream::error_stream(), |
2680 "Invalid initial heap size: %s\n", option->optionString); | 2680 "Invalid initial heap size: %s\n", option->optionString); |
2681 describe_range_error(errcode); | 2681 describe_range_error(errcode); |
2682 return JNI_EINVAL; | 2682 return JNI_EINVAL; |
2683 } | 2683 } |
2684 set_min_heap_size((uintx)long_initial_heap_size); | |
2685 // Currently the minimum size and the initial heap sizes are the same. | |
2686 // Can be overridden with -XX:InitialHeapSize. | |
2684 FLAG_SET_CMDLINE(uintx, InitialHeapSize, (uintx)long_initial_heap_size); | 2687 FLAG_SET_CMDLINE(uintx, InitialHeapSize, (uintx)long_initial_heap_size); |
2685 // Currently the minimum size and the initial heap sizes are the same. | |
2686 set_min_heap_size(InitialHeapSize); | |
2687 // -Xmx | 2688 // -Xmx |
2688 } else if (match_option(option, "-Xmx", &tail) || match_option(option, "-XX:MaxHeapSize=", &tail)) { | 2689 } else if (match_option(option, "-Xmx", &tail) || match_option(option, "-XX:MaxHeapSize=", &tail)) { |
2689 julong long_max_heap_size = 0; | 2690 julong long_max_heap_size = 0; |
2690 ArgsRange errcode = parse_memory_size(tail, &long_max_heap_size, 1); | 2691 ArgsRange errcode = parse_memory_size(tail, &long_max_heap_size, 1); |
2691 if (errcode != arg_in_range) { | 2692 if (errcode != arg_in_range) { |