8154838: G1CardLiveData::free_large_bitmap() uses wrong calculation to determine the number of words

Use the exact same calculation as G1CardLiveData::allocate_large_bitmap() in free_large_bitmap().

Reviewed-by: stefank, jmasa
This commit is contained in:
Thomas Schatzl 2016-04-22 10:19:22 +02:00
parent 7cd3700010
commit 78d48b8bee

View File

@ -60,7 +60,7 @@ G1CardLiveData::bm_word_t* G1CardLiveData::allocate_large_bitmap(size_t size_in_
}
void G1CardLiveData::free_large_bitmap(bm_word_t* bitmap, size_t size_in_bits) {
MmapArrayAllocator<bm_word_t, mtGC>::free(bitmap, size_in_bits / BitsPerWord);
MmapArrayAllocator<bm_word_t, mtGC>::free(bitmap, BitMap::calc_size_in_words(size_in_bits));
}
void G1CardLiveData::initialize(size_t max_capacity, uint num_max_regions) {