예제 #1
0
 private void scanReferenceSet(TraceLocal trace, Set<ReferenceValue> set) {
   for (ReferenceValue value : set) {
     ObjectReference referent = value.getObjectValue();
     if (trace.isReferentLive(referent)) {
       value.processReference(trace);
     } else {
       value.clear();
     }
   }
 }
예제 #2
0
 /**
  * {@inheritDoc}
  *
  * <p>Only relevant to collectors like MarkCompact.
  */
 @Override
 public void forward(TraceLocal trace, boolean nursery) {
   Trace.trace(
       Item.REFERENCES,
       "Forwarding %s references: %s",
       semantics,
       nursery ? "nursery" : "full-heap");
   for (ReferenceValue value : oldRefs) {
     value.forwardReference(trace);
   }
 }
예제 #3
0
 /**
  * Discover a reference value while scanning stacks
  *
  * @param ref Reference value
  */
 public static void discover(ReferenceValue ref) {
   processors.get(ref.getSemantics()).add(ref);
 }