mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
7197906: BlockOffsetArray::power_to_cards_back() needs to handle > 32 bit shifts
Reviewed-by: brutisso, johnc, ysr
This commit is contained in:
parent
c188598ddd
commit
18582cee62
3 changed files with 3 additions and 3 deletions
|
@ -110,7 +110,7 @@ int CMBitMapRO::heapWordDiffToOffsetDiff(size_t diff) const {
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
bool CMBitMapRO::covers(ReservedSpace rs) const {
|
bool CMBitMapRO::covers(ReservedSpace rs) const {
|
||||||
// assert(_bm.map() == _virtual_space.low(), "map inconsistency");
|
// 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");
|
"size inconsistency");
|
||||||
return _bmStartWord == (HeapWord*)(rs.base()) &&
|
return _bmStartWord == (HeapWord*)(rs.base()) &&
|
||||||
_bmWordSize == rs.size()>>LogHeapWordSize;
|
_bmWordSize == rs.size()>>LogHeapWordSize;
|
||||||
|
|
|
@ -273,7 +273,7 @@ OtherRegionsTable::OtherRegionsTable(HeapRegion* hr) :
|
||||||
if (_max_fine_entries == 0) {
|
if (_max_fine_entries == 0) {
|
||||||
assert(_mod_max_fine_entries_mask == 0, "Both or none.");
|
assert(_mod_max_fine_entries_mask == 0, "Both or none.");
|
||||||
size_t max_entries_log = (size_t)log2_long((jlong)G1RSetRegionEntries);
|
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;
|
_mod_max_fine_entries_mask = _max_fine_entries - 1;
|
||||||
|
|
||||||
assert(_fine_eviction_sample_size == 0
|
assert(_fine_eviction_sample_size == 0
|
||||||
|
|
|
@ -285,7 +285,7 @@ class BlockOffsetArray: public BlockOffsetTable {
|
||||||
};
|
};
|
||||||
|
|
||||||
static size_t power_to_cards_back(uint i) {
|
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) {
|
static size_t power_to_words_back(uint i) {
|
||||||
return power_to_cards_back(i) * N_words;
|
return power_to_cards_back(i) * N_words;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue