src/hotspot/share/code/compiledMethod.cpp
changeset 50995 3c59afe1afc9
parent 50416 ef980b9ac191
child 51333 f6641fcf7b7e
--- a/src/hotspot/share/code/compiledMethod.cpp	Fri Jul 06 00:40:12 2018 +0530
+++ b/src/hotspot/share/code/compiledMethod.cpp	Thu Jul 05 09:38:15 2018 +0200
@@ -325,6 +325,7 @@
 // Clear ICStubs of all compiled ICs
 void CompiledMethod::clear_ic_stubs() {
   assert_locked_or_safepoint(CompiledIC_lock);
+  ResourceMark rm;
   RelocIterator iter(this);
   while(iter.next()) {
     if (iter.type() == relocInfo::virtual_call_type) {
@@ -547,6 +548,7 @@
 bool CompiledMethod::cleanup_inline_caches_impl(bool parallel, bool unloading_occurred, bool clean_all) {
   assert_locked_or_safepoint(CompiledIC_lock);
   bool postponed = false;
+  ResourceMark rm;
 
   // Find all calls in an nmethod and clear the ones that point to non-entrant,
   // zombie and unloaded nmethods.