hotspot/src/share/vm/memory/collectorPolicy.cpp
changeset 23224 b156569bc190
parent 22776 d99c54477401
child 23851 60303358c862
--- a/hotspot/src/share/vm/memory/collectorPolicy.cpp	Fri Jan 31 13:38:01 2014 +0100
+++ b/hotspot/src/share/vm/memory/collectorPolicy.cpp	Fri Feb 21 09:48:52 2014 +0100
@@ -304,10 +304,13 @@
   }
 
   // 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;