diff options
author | sjohanss <none@none> | 2014-02-21 09:48:52 +0100 |
---|---|---|
committer | sjohanss <none@none> | 2014-02-21 09:48:52 +0100 |
commit | 5e4743db0bc137e937a6822641901d8b03ffb891 (patch) | |
tree | 31813465baae078bb7e89a1ff354455e32812d1e /src/share/vm/memory/collectorPolicy.cpp | |
parent | 0702f6b789ed6135ef7010367b3d4920fe73d7e9 (diff) |
8035057: NewSize ergonomics wrong when setting small or unaligned size on command line
Summary: Making sure that if NewSize is set on the command line it should be used for both min and initial size even if it is re-aligned.
Reviewed-by: jwilhelm, jmasa
Diffstat (limited to 'src/share/vm/memory/collectorPolicy.cpp')
-rw-r--r-- | src/share/vm/memory/collectorPolicy.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/share/vm/memory/collectorPolicy.cpp b/src/share/vm/memory/collectorPolicy.cpp index e7dc6d7cc..ac9cb7b62 100644 --- a/src/share/vm/memory/collectorPolicy.cpp +++ b/src/share/vm/memory/collectorPolicy.cpp @@ -307,10 +307,13 @@ void GenCollectorPolicy::initialize_flags() { } // Now take the actual NewSize into account. We will silently increase NewSize - // if the user specified a smaller value. + // if the user specified a smaller or unaligned value. smallest_new_size = MAX2(smallest_new_size, (uintx)align_size_down(NewSize, _gen_alignment)); if (smallest_new_size != NewSize) { - FLAG_SET_ERGO(uintx, NewSize, smallest_new_size); + // Do not use FLAG_SET_ERGO to update NewSize here, since this will override + // if NewSize was set on the command line or not. This information is needed + // later when setting the initial and minimum young generation size. + NewSize = smallest_new_size; } _initial_gen0_size = NewSize; |