src/share/vm/gc_implementation/g1/sparsePRT.cpp
Print this page
rev 6289 : 8040792: G1CodeRootChunkManager::static_mem_size returns the wrong size
Summary: The G1CodeRootChunkManager::static_mem_size method returned the size of the this pointer instead of the actual static memory size.
Reviewed-by: tbd, tbd
*** 368,378 ****
SparsePRTEntry* e = entry_for_region_ind(region_index);
return (e != NULL && e->contains_card(card_index));
}
size_t RSHashTable::mem_size() const {
! return sizeof(this) +
capacity() * (SparsePRTEntry::size() + sizeof(int));
}
// ----------------------------------------------------------------------
--- 368,378 ----
SparsePRTEntry* e = entry_for_region_ind(region_index);
return (e != NULL && e->contains_card(card_index));
}
size_t RSHashTable::mem_size() const {
! return sizeof(RSHashTable) +
capacity() * (SparsePRTEntry::size() + sizeof(int));
}
// ----------------------------------------------------------------------
*** 470,480 ****
size_t SparsePRT::mem_size() const {
// We ignore "_cur" here, because it either = _next, or else it is
// on the deleted list.
! return sizeof(this) + _next->mem_size();
}
bool SparsePRT::add_card(RegionIdx_t region_id, CardIdx_t card_index) {
#if SPARSE_PRT_VERBOSE
gclog_or_tty->print_cr(" Adding card %d from region %d to region %u sparse.",
--- 470,480 ----
size_t SparsePRT::mem_size() const {
// We ignore "_cur" here, because it either = _next, or else it is
// on the deleted list.
! return sizeof(SparsePRT) + _next->mem_size();
}
bool SparsePRT::add_card(RegionIdx_t region_id, CardIdx_t card_index) {
#if SPARSE_PRT_VERBOSE
gclog_or_tty->print_cr(" Adding card %d from region %d to region %u sparse.",