提交 4788abbe 编写于 作者: B brutisso

7197906: BlockOffsetArray::power_to_cards_back() needs to handle > 32 bit shifts

Reviewed-by: brutisso, johnc, ysr
Contributed-by: NHal Mo <kungu.mjh@taobao.com>
上级 c8dc8946
......@@ -110,7 +110,7 @@ int CMBitMapRO::heapWordDiffToOffsetDiff(size_t diff) const {
#ifndef PRODUCT
bool CMBitMapRO::covers(ReservedSpace rs) const {
// assert(_bm.map() == _virtual_space.low(), "map inconsistency");
assert(((size_t)_bm.size() * (size_t)(1 << _shifter)) == _bmWordSize,
assert(((size_t)_bm.size() * ((size_t)1 << _shifter)) == _bmWordSize,
"size inconsistency");
return _bmStartWord == (HeapWord*)(rs.base()) &&
_bmWordSize == rs.size()>>LogHeapWordSize;
......
......@@ -273,7 +273,7 @@ OtherRegionsTable::OtherRegionsTable(HeapRegion* hr) :
if (_max_fine_entries == 0) {
assert(_mod_max_fine_entries_mask == 0, "Both or none.");
size_t max_entries_log = (size_t)log2_long((jlong)G1RSetRegionEntries);
_max_fine_entries = (size_t)(1 << max_entries_log);
_max_fine_entries = (size_t)1 << max_entries_log;
_mod_max_fine_entries_mask = _max_fine_entries - 1;
assert(_fine_eviction_sample_size == 0
......
......@@ -285,7 +285,7 @@ class BlockOffsetArray: public BlockOffsetTable {
};
static size_t power_to_cards_back(uint i) {
return (size_t)(1 << (LogBase * i));
return (size_t)1 << (LogBase * i);
}
static size_t power_to_words_back(uint i) {
return power_to_cards_back(i) * N_words;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册