< prev index next >

src/hotspot/share/gc/shared/oopStorage.inline.hpp

Print this page
@@ -29,10 +29,11 @@
  
  #include "memory/allocation.hpp"
  #include "metaprogramming/conditional.hpp"
  #include "metaprogramming/isConst.hpp"
  #include "oops/oop.hpp"
+ #include "runtime/objectMonitor.hpp"
  #include "runtime/safepoint.hpp"
  #include "utilities/align.hpp"
  #include "utilities/count_trailing_zeros.hpp"
  #include "utilities/debug.hpp"
  #include "utilities/globalDefinitions.hpp"

@@ -260,10 +261,11 @@
      oop v = *ptr;
      if (v != NULL) {
        if (_is_alive->do_object_b(v)) {
          result = _f(ptr);
        } else {
+         ObjectMonitor::maybe_deflate_dead(ptr);
          *ptr = NULL;            // Clear dead value.
        }
      }
      return result;
    }
< prev index next >