G1CardLiveData::bm_word_t* G1CardLiveData::allocate_large_bitmap(size_t size_in_bits) {
size_t size_in_words = BitMap::calc_size_in_words(size_in_bits);
bm_word_t* map = MmapArrayAllocator<bm_word_t, mtGC>::allocate(size_in_words);
return map;
}
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);
}
The calculation of the number of elements in free_large_bitmap() is different to the one of allocate_large_bitmap().
The calculation itself is correct, as size_in_bits is always word aligned for all callers.
size_t size_in_words = BitMap::calc_size_in_words(size_in_bits);
bm_word_t* map = MmapArrayAllocator<bm_word_t, mtGC>::allocate(size_in_words);
return map;
}
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);
}
The calculation of the number of elements in free_large_bitmap() is different to the one of allocate_large_bitmap().
The calculation itself is correct, as size_in_bits is always word aligned for all callers.
- relates to
-
JDK-8151386 Extract card live data out of G1ConcurrentMark
-
- Resolved
-