1961 } |
1961 } |
1962 |
1962 |
1963 // Iteration support, mostly delegated from a CMS generation |
1963 // Iteration support, mostly delegated from a CMS generation |
1964 |
1964 |
1965 void CompactibleFreeListSpace::save_marks() { |
1965 void CompactibleFreeListSpace::save_marks() { |
1966 // mark the "end" of the used space at the time of this call; |
1966 assert(Thread::current()->is_VM_thread(), |
|
1967 "Global variable should only be set when single-threaded"); |
|
1968 // Mark the "end" of the used space at the time of this call; |
1967 // note, however, that promoted objects from this point |
1969 // note, however, that promoted objects from this point |
1968 // on are tracked in the _promoInfo below. |
1970 // on are tracked in the _promoInfo below. |
1969 set_saved_mark_word(unallocated_block()); |
1971 set_saved_mark_word(unallocated_block()); |
|
1972 #ifdef ASSERT |
|
1973 // Check the sanity of save_marks() etc. |
|
1974 MemRegion ur = used_region(); |
|
1975 MemRegion urasm = used_region_at_save_marks(); |
|
1976 assert(ur.contains(urasm), |
|
1977 err_msg(" Error at save_marks(): [" PTR_FORMAT "," PTR_FORMAT ")" |
|
1978 " should contain [" PTR_FORMAT "," PTR_FORMAT ")", |
|
1979 ur.start(), ur.end(), urasm.start(), urasm.end())); |
|
1980 #endif |
1970 // inform allocator that promotions should be tracked. |
1981 // inform allocator that promotions should be tracked. |
1971 assert(_promoInfo.noPromotions(), "_promoInfo inconsistency"); |
1982 assert(_promoInfo.noPromotions(), "_promoInfo inconsistency"); |
1972 _promoInfo.startTrackingPromotions(); |
1983 _promoInfo.startTrackingPromotions(); |
1973 } |
1984 } |
1974 |
1985 |