hotspot/src/share/vm/code/codeBlob.cpp
changeset 36074 11263906664c
parent 35542 9dccb7f9f656
child 37248 11a660dbbb8e
--- a/hotspot/src/share/vm/code/codeBlob.cpp	Mon Feb 15 20:02:51 2016 +0300
+++ b/hotspot/src/share/vm/code/codeBlob.cpp	Mon Feb 15 20:26:02 2016 +0300
@@ -291,6 +291,9 @@
   {
     MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
     blob = new (size) MethodHandlesAdapterBlob(size);
+    if (blob == NULL) {
+      vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "CodeCache: no room for method handle adapter blob");
+    }
   }
   // Track memory usage statistic after releasing CodeCache_lock
   MemoryService::track_code_cache_memory_usage();