288 } |
288 } |
289 |
289 |
290 // Mapping from card marking array entry to address of first word |
290 // Mapping from card marking array entry to address of first word |
291 HeapWord* addr_for(const jbyte* p) const { |
291 HeapWord* addr_for(const jbyte* p) const { |
292 assert(p >= _byte_map && p < _byte_map + _byte_map_size, |
292 assert(p >= _byte_map && p < _byte_map + _byte_map_size, |
293 "out of bounds access to card marking array"); |
293 "out of bounds access to card marking array. p: " PTR_FORMAT |
|
294 " _byte_map: " PTR_FORMAT " _byte_map + _byte_map_size: " PTR_FORMAT, |
|
295 p2i(p), p2i(_byte_map), p2i(_byte_map + _byte_map_size)); |
294 size_t delta = pointer_delta(p, byte_map_base, sizeof(jbyte)); |
296 size_t delta = pointer_delta(p, byte_map_base, sizeof(jbyte)); |
295 HeapWord* result = (HeapWord*) (delta << card_shift); |
297 HeapWord* result = (HeapWord*) (delta << card_shift); |
296 assert(_whole_heap.contains(result), |
298 assert(_whole_heap.contains(result), |
297 "Returning result = " PTR_FORMAT " out of bounds of " |
299 "Returning result = " PTR_FORMAT " out of bounds of " |
298 " card marking array's _whole_heap = [" PTR_FORMAT "," PTR_FORMAT ")", |
300 " card marking array's _whole_heap = [" PTR_FORMAT "," PTR_FORMAT ")", |