HeapRegion::oops_on_card_seq_iterate_careful begins with a block of code that intersects the allocated part of the region (based on top or scan_top) with the card region, and if empty exits early. It then tests the region for being young, exiting early if so. The is_young test is noted as needing to follow the check for allocation in the region, and notes that a newly allocated young region has its type set before top is set. However, there don't appear to be any memory barriers to enforce either ordering.