--- old/src/hotspot/share/memory/universe.cpp 2020-07-23 03:18:49.238383120 -0400 +++ new/src/hotspot/share/memory/universe.cpp 2020-07-23 03:18:48.124369800 -0400 @@ -118,6 +118,7 @@ // _out_of_memory_errors is an objArray enum OutOfMemoryInstance { _oom_java_heap, + _oom_c_heap, _oom_metaspace, _oom_class_metaspace, _oom_array_size, @@ -585,6 +586,10 @@ return gen_out_of_memory_error(out_of_memory_errors()->obj_at(_oom_java_heap)); } +oop Universe::out_of_memory_error_c_heap() { + return gen_out_of_memory_error(out_of_memory_errors()->obj_at(_oom_c_heap)); +} + oop Universe::out_of_memory_error_metaspace() { return gen_out_of_memory_error(out_of_memory_errors()->obj_at(_oom_metaspace)); } @@ -680,6 +685,9 @@ Handle msg = java_lang_String::create_from_str("Java heap space", CHECK); java_lang_Throwable::set_message(oom_array->obj_at(_oom_java_heap), msg()); + msg = java_lang_String::create_from_str("C heap space", CHECK); + java_lang_Throwable::set_message(oom_array->obj_at(_oom_c_heap), msg()); + msg = java_lang_String::create_from_str("Metaspace", CHECK); java_lang_Throwable::set_message(oom_array->obj_at(_oom_metaspace), msg()); @@ -1016,7 +1024,6 @@ Handle msg = java_lang_String::create_from_str("/ by zero", CHECK_false); java_lang_Throwable::set_message(Universe::arithmetic_exception_instance(), msg()); - Universe::initialize_known_methods(CHECK_false); // This needs to be done before the first scavenge/gc, since