// During evacuation we use the card table to consolidate the cards we need to // scan for roots onto the card table from the various sources. Further it is // used to record already completely scanned cards to avoid re-scanning them // when incrementally evacuating the old gen regions of a collection set. // This means that already scanned cards should be preserved. // // The merge at the start of each evacuation round simply sets cards to dirty // that are clean; scanned cards are set to 0x1. // // This means that the LSB determines what to do with the card during evacuation // given the following possible values: // // 11111111 - clean, do not scan // 00000001 - already scanned, do not scan // 00000000 - dirty, needs to be scanned. //
g1_card_already_scanned = 0x1
};
// Mark the given card as Dirty if it is Clean. Returns whether the card was // Clean before this operation. This result may be inaccurate as it does not // perform the dirtying atomically. inlinebool mark_clean_as_dirty(CardValue* card);
// Change Clean cards in a (large) area on the card table as Dirty, preserving // already scanned cards. Assumes that most cards in that area are Clean. inlinevoid mark_range_dirty(size_t start_card_index, size_t num_cards);
// Change the given range of dirty cards to "which". All of these cards must be Dirty. inlinevoid change_dirty_cards_to(size_t start_card_index, size_t num_cards, CardValue which);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.