368 SparsePRTEntry* e = entry_for_region_ind(region_index); |
368 SparsePRTEntry* e = entry_for_region_ind(region_index); |
369 return (e != NULL && e->contains_card(card_index)); |
369 return (e != NULL && e->contains_card(card_index)); |
370 } |
370 } |
371 |
371 |
372 size_t RSHashTable::mem_size() const { |
372 size_t RSHashTable::mem_size() const { |
373 return sizeof(this) + |
373 return sizeof(RSHashTable) + |
374 capacity() * (SparsePRTEntry::size() + sizeof(int)); |
374 capacity() * (SparsePRTEntry::size() + sizeof(int)); |
375 } |
375 } |
376 |
376 |
377 // ---------------------------------------------------------------------- |
377 // ---------------------------------------------------------------------- |
378 |
378 |
470 |
470 |
471 |
471 |
472 size_t SparsePRT::mem_size() const { |
472 size_t SparsePRT::mem_size() const { |
473 // We ignore "_cur" here, because it either = _next, or else it is |
473 // We ignore "_cur" here, because it either = _next, or else it is |
474 // on the deleted list. |
474 // on the deleted list. |
475 return sizeof(this) + _next->mem_size(); |
475 return sizeof(SparsePRT) + _next->mem_size(); |
476 } |
476 } |
477 |
477 |
478 bool SparsePRT::add_card(RegionIdx_t region_id, CardIdx_t card_index) { |
478 bool SparsePRT::add_card(RegionIdx_t region_id, CardIdx_t card_index) { |
479 #if SPARSE_PRT_VERBOSE |
479 #if SPARSE_PRT_VERBOSE |
480 gclog_or_tty->print_cr(" Adding card %d from region %d to region %u sparse.", |
480 gclog_or_tty->print_cr(" Adding card %d from region %d to region %u sparse.", |