> On Jun 29, 2016, at 6:42 PM, David Holmes <david.hol...@oracle.com> wrote:
> 
> The earlier you initialize Throwable the earlier you can try to create an 
> exception that has a backtrace. But there will always be a region of code 
> where we can't throw an OOME with a backtrace because of the missing 
> initialization of Throwable. So we can narrow that window by moving the 
> initialization of Throwable (which in turn requires a whole bunch of 
> collection classes - so the window has a fixed minimum size [ unless we do 
> some creative restructuring of Throwable's static initialization]). My 
> argument, which I think I've now convinced Kim of, is that we shouldn't be 
> trying to throw an OOME with a stacktrace if Throwable has not been 
> initialized - and that is where the change to gen_out_of_memory_error comes 
> in. It is actually passed the pre-allocated OOME that has no backtrace and 
> will never have a backtrace, and that is what should be thrown when Throwable 
> has not been initialized.

Thanks for the clarification.  It makes sense and the pre-allocated OOME with 
no backtrace should be used for this early OOM scenario.

Mandy

Reply via email to