8149405: OOM Error running java/lang/invoke/MethodHandlesTest.java on windows-x86
authordrwhite
Tue, 12 Apr 2016 14:46:02 -0400
changeset 37473 8af1deb0c879
parent 37472 4eea82a66dab
child 37474 5d721e36f744
child 37491 edf4cc53f5a3
8149405: OOM Error running java/lang/invoke/MethodHandlesTest.java on windows-x86 Summary: Add missing ResourceMarks to release memory more quickly. Reviewed-by: jmasa, kbarrett
hotspot/src/share/vm/oops/methodData.cpp
--- a/hotspot/src/share/vm/oops/methodData.cpp	Wed Apr 13 13:53:05 2016 +0200
+++ b/hotspot/src/share/vm/oops/methodData.cpp	Tue Apr 12 14:46:02 2016 -0400
@@ -1729,6 +1729,7 @@
 }
 
 void MethodData::clean_method_data(BoolObjectClosure* is_alive) {
+  ResourceMark rm;
   for (ProfileData* data = first_data();
        is_valid(data);
        data = next_data(data)) {
@@ -1745,6 +1746,7 @@
 }
 
 void MethodData::clean_weak_method_links() {
+  ResourceMark rm;
   for (ProfileData* data = first_data();
        is_valid(data);
        data = next_data(data)) {
@@ -1758,6 +1760,7 @@
 
 #ifdef ASSERT
 void MethodData::verify_clean_weak_method_links() {
+  ResourceMark rm;
   for (ProfileData* data = first_data();
        is_valid(data);
        data = next_data(data)) {