Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/hotspot/share/gc/shared/memAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ bool MemAllocator::Allocation::check_out_of_memory() {
// -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support
report_java_out_of_memory(message);
if (JvmtiExport::should_post_resource_exhausted()) {
#ifdef CHECK_UNHANDLED_OOPS
// obj is null, no need to handle, but CheckUnhandledOops is not aware about null
THREAD->allow_unhandled_oop(_obj_ptr);
#endif // CHECK_UNHANDLED_OOPS
JvmtiExport::post_resource_exhausted(
JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR | JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP,
message);
Expand Down