Exemple #1
0
 /**
  * Perform any required initialization of the GC portion of the header.
  *
  * @param object the object ref to the storage to be initialized
  * @param alloc is this initialization occuring due to (initial) allocation (true) or due to
  *     copying (false)?
  */
 @Inline
 public void initializeHeader(ObjectReference object, boolean alloc) {
   Word oldValue = VM.objectModel.readAvailableBitsWord(object);
   Word newValue = oldValue.and(LOS_BIT_MASK.not()).or(markState);
   if (alloc) newValue = newValue.or(NURSERY_BIT);
   if (Plan.NEEDS_LOG_BIT_IN_HEADER) newValue = newValue.or(Plan.UNLOGGED_BIT);
   VM.objectModel.writeAvailableBitsWord(object, newValue);
   Address cell = VM.objectModel.objectStartRef(object);
   treadmill.addToTreadmill(Treadmill.midPayloadToNode(cell), alloc);
 }