hotspot/src/share/vm/memory/collectorPolicy.cpp
changeset 23224 b156569bc190
parent 22776 d99c54477401
child 23851 60303358c862
equal deleted inserted replaced
23223:d38d6390733f 23224:b156569bc190
   302       _initial_heap_byte_size = smallest_heap_size;
   302       _initial_heap_byte_size = smallest_heap_size;
   303     }
   303     }
   304   }
   304   }
   305 
   305 
   306   // Now take the actual NewSize into account. We will silently increase NewSize
   306   // Now take the actual NewSize into account. We will silently increase NewSize
   307   // if the user specified a smaller value.
   307   // if the user specified a smaller or unaligned value.
   308   smallest_new_size = MAX2(smallest_new_size, (uintx)align_size_down(NewSize, _gen_alignment));
   308   smallest_new_size = MAX2(smallest_new_size, (uintx)align_size_down(NewSize, _gen_alignment));
   309   if (smallest_new_size != NewSize) {
   309   if (smallest_new_size != NewSize) {
   310     FLAG_SET_ERGO(uintx, NewSize, smallest_new_size);
   310     // Do not use FLAG_SET_ERGO to update NewSize here, since this will override
       
   311     // if NewSize was set on the command line or not. This information is needed
       
   312     // later when setting the initial and minimum young generation size.
       
   313     NewSize = smallest_new_size;
   311   }
   314   }
   312   _initial_gen0_size = NewSize;
   315   _initial_gen0_size = NewSize;
   313 
   316 
   314   if (!FLAG_IS_DEFAULT(MaxNewSize)) {
   317   if (!FLAG_IS_DEFAULT(MaxNewSize)) {
   315     uintx min_new_size = MAX2(_gen_alignment, _min_gen0_size);
   318     uintx min_new_size = MAX2(_gen_alignment, _min_gen0_size);