< prev index next > src/hotspot/share/gc/z/zLiveMap.inline.hpp
Print this page
while (index < end_index) {
// Calculate object address
const uintptr_t addr = page_start + ((index / 2) << page_object_alignment_shift);
- // Get the size of the object before calling the closure, which
- // might overwrite the object in case we are relocating in-place.
- const size_t size = ZUtils::object_size(addr);
-
// Apply closure
cl->do_object(ZOop::from_address(addr));
// Find next bit after this object
! const uintptr_t next_addr = align_up(addr + size, 1 << page_object_alignment_shift);
const BitMap::idx_t next_index = ((next_addr - page_start) >> page_object_alignment_shift) * 2;
if (next_index >= end_index) {
// End of live map
break;
}
while (index < end_index) {
// Calculate object address
const uintptr_t addr = page_start + ((index / 2) << page_object_alignment_shift);
// Apply closure
cl->do_object(ZOop::from_address(addr));
// Find next bit after this object
! const uintptr_t next_addr = align_up(addr + 1, 1 << page_object_alignment_shift);
const BitMap::idx_t next_index = ((next_addr - page_start) >> page_object_alignment_shift) * 2;
if (next_index >= end_index) {
// End of live map
break;
}
< prev index next >