src/hotspot/share/runtime/synchronizer.cpp
changeset 58083 9046db64ca39
parent 57906 e17f768b3b71
child 58177 4932dce35882
--- a/src/hotspot/share/runtime/synchronizer.cpp	Wed Sep 11 10:19:09 2019 +0200
+++ b/src/hotspot/share/runtime/synchronizer.cpp	Wed Sep 11 14:16:27 2019 +0200
@@ -1075,17 +1075,8 @@
     size_t neededsize = sizeof(PaddedObjectMonitor) * _BLOCKSIZE;
     PaddedObjectMonitor* temp;
     size_t aligned_size = neededsize + (DEFAULT_CACHE_LINE_SIZE - 1);
-    void* real_malloc_addr = (void*)NEW_C_HEAP_ARRAY(char, aligned_size,
-                                                     mtInternal);
+    void* real_malloc_addr = NEW_C_HEAP_ARRAY(char, aligned_size, mtInternal);
     temp = (PaddedObjectMonitor*)align_up(real_malloc_addr, DEFAULT_CACHE_LINE_SIZE);
-
-    // NOTE: (almost) no way to recover if allocation failed.
-    // We might be able to induce a STW safepoint and scavenge enough
-    // ObjectMonitors to permit progress.
-    if (temp == NULL) {
-      vm_exit_out_of_memory(neededsize, OOM_MALLOC_ERROR,
-                            "Allocate ObjectMonitors");
-    }
     (void)memset((void *) temp, 0, neededsize);
 
     // Format the block.