コード例 #1
0
 /**
  * Debugging routine only. Returns non-null JNIHandleBlock containing the JNI handle or null if
  * this handle block and its successors did not contain it (or if the handle was deleted).
  */
 public JNIHandleBlock blockContainingHandle(Address jniHandle) {
   JNIHandleBlock cur = this;
   while (cur != null) {
     if (indexOfHandle(jniHandle) >= 0) {
       return cur;
     }
     cur = cur.next();
   }
   return null;
 }
コード例 #2
0
  public void oopsDo(AddressVisitor visitor) {
    // Visit handles in this block
    for (int i = 0; i < top(); i++) {
      Address cur = getOopHandleAddress(i);
      if (cur != null) {
        visitor.visitAddress(cur);
      }
    }

    // Visit handles in subsequent blocks if necessary
    JNIHandleBlock n = next();
    if (n != null) {
      n.oopsDo(visitor);
    }
  }
コード例 #3
0
 // Traverse a JNIHandleBlock
 private void doJNIHandleBlock(JNIHandleBlock handles, AddressVisitor oopVisitor) {
   handles.oopsDo(oopVisitor);
 }