569 // never attempt to fill in the stack trace of preallocated errors that do not have |
569 // never attempt to fill in the stack trace of preallocated errors that do not have |
570 // backtrace. These errors are kept alive forever and may be "re-used" when all |
570 // backtrace. These errors are kept alive forever and may be "re-used" when all |
571 // preallocated errors with backtrace have been consumed. Also need to avoid |
571 // preallocated errors with backtrace have been consumed. Also need to avoid |
572 // a potential loop which could happen if an out of memory occurs when attempting |
572 // a potential loop which could happen if an out of memory occurs when attempting |
573 // to allocate the backtrace. |
573 // to allocate the backtrace. |
574 return ((!oopDesc::equals(throwable(), Universe::_out_of_memory_error_java_heap)) && |
574 return ((throwable() != Universe::_out_of_memory_error_java_heap) && |
575 (!oopDesc::equals(throwable(), Universe::_out_of_memory_error_metaspace)) && |
575 (throwable() != Universe::_out_of_memory_error_metaspace) && |
576 (!oopDesc::equals(throwable(), Universe::_out_of_memory_error_class_metaspace)) && |
576 (throwable() != Universe::_out_of_memory_error_class_metaspace) && |
577 (!oopDesc::equals(throwable(), Universe::_out_of_memory_error_array_size)) && |
577 (throwable() != Universe::_out_of_memory_error_array_size) && |
578 (!oopDesc::equals(throwable(), Universe::_out_of_memory_error_gc_overhead_limit)) && |
578 (throwable() != Universe::_out_of_memory_error_gc_overhead_limit) && |
579 (!oopDesc::equals(throwable(), Universe::_out_of_memory_error_realloc_objects)) && |
579 (throwable() != Universe::_out_of_memory_error_realloc_objects) && |
580 (!oopDesc::equals(throwable(), Universe::_out_of_memory_error_retry))); |
580 (throwable() != Universe::_out_of_memory_error_retry)); |
581 } |
581 } |
582 |
582 |
583 |
583 |
584 oop Universe::gen_out_of_memory_error(oop default_err) { |
584 oop Universe::gen_out_of_memory_error(oop default_err) { |
585 // generate an out of memory error: |
585 // generate an out of memory error: |