diff src/share/vm/gc_interface/collectedHeap.hpp @ 989:148e5441d916

6863023: need non-perm oops in code cache for JSR 292 Summary: Make a special root-list for those few nmethods which might contain non-perm oops. Reviewed-by: twisti, kvn, never, jmasa, ysr
author jrose
date Tue, 15 Sep 2009 21:53:47 -0700
parents df6caf649ff7
children 54b3b351d6f9
line wrap: on
line diff
--- a/src/share/vm/gc_interface/collectedHeap.hpp	Tue Sep 15 11:09:34 2009 -0700
+++ b/src/share/vm/gc_interface/collectedHeap.hpp	Tue Sep 15 21:53:47 2009 -0700
@@ -256,6 +256,14 @@
     return p == NULL || is_in_permanent(p);
   }
 
+  // An object is scavengable if its location may move during a scavenge.
+  // (A scavenge is a GC which is not a full GC.)
+  // Currently, this just means it is not perm (and not null).
+  // This could change if we rethink what's in perm-gen.
+  bool is_scavengable(const void *p) const {
+    return !is_in_permanent_or_null(p);
+  }
+
   // Returns "TRUE" if "p" is a method oop in the
   // current heap, with high probability. This predicate
   // is not stable, in general.