Request for review: 7196080: assert(max_heap >= InitialHeapSize) in arguments.cpp

Thomas Schatzl thomas.schatzl at
Mon Mar 18 05:49:41 PDT 2013

Hi all,

On Fri, 2013-03-15 at 09:37 -0700, Jon Masamitsu wrote: 
> Looks fine.
> Jon
> On 3/14/2013 5:41 PM, Tao Mao wrote:
> > The comment
> >
> > " 1172 // MaxHeapSize is aligned down in collectorPolicy"
> >
> > mislead here so I deleted it (because: in fact, in 
> > collectorPolicy.cpp, MaxHeapSize is aligned up). But the assertions 
> > still have some value.
> >

  both asserts will fail when using a small heap size, e.g. 1-3M.

This is because default OldSize (and NewSize) are >=4(>=1M)
(>= due to the use of ScaleForWordSize() on 64 bit)

Additionally, in TwoGenerationPolicy::initialize_flags(),
OldSize/NewSize and MaxHeapSize are intentionally synched, i.e.
MaxHeapSize = OldSize + NewSize so that these asserts hold.

My suggestion is to just remove them as these asserts seem to contradict
Atm these asserts cause differences in what heap sizes the VM accepts
when running with or without debug info when using cms.

Sorry for being a bit late.


More information about the hotspot-gc-dev mailing list