Beispiel #1
0
  /**
   * Perform a per-collector collection phase.
   *
   * @param phaseId The collection phase to perform
   * @param primary Perform any single-threaded activities using this thread.
   */
  @Inline
  public void collectionPhase(short phaseId, boolean primary) {
    if (phaseId == GenRC.PREPARE) {
      super.collectionPhase(phaseId, primary);
      rc.prepare();
      return;
    }

    if (phaseId == GenRC.RELEASE) {
      super.collectionPhase(phaseId, primary);
      rc.release();
      return;
    }

    super.collectionPhase(phaseId, primary);
  }
Beispiel #2
0
 /**
  * Allocate space for copying an object (this method <i>does not</i> copy the object, it only
  * allocates space)
  *
  * @param original A reference to the original object
  * @param bytes The size of the space to be allocated (in bytes)
  * @param align The requested alignment
  * @param offset The alignment offset
  * @return The address of the first byte of the allocated region
  */
 @Inline
 public final Address allocCopy(
     ObjectReference original, int bytes, int align, int offset, int allocator) {
   if (VM.VERIFY_ASSERTIONS) {
     VM.assertions._assert(allocator == GenRC.ALLOC_RC);
   }
   return rc.alloc(bytes, align, offset);
 }