equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
90 inline BitMap::idx_t ZLiveMap::segment_size() const { |
90 inline BitMap::idx_t ZLiveMap::segment_size() const { |
91 return _bitmap.size() / nsegments; |
91 return _bitmap.size() / nsegments; |
92 } |
92 } |
93 |
93 |
94 inline BitMap::idx_t ZLiveMap::index_to_segment(BitMap::idx_t index) const { |
94 inline BitMap::idx_t ZLiveMap::index_to_segment(BitMap::idx_t index) const { |
95 return index >> _shift; |
95 return index >> _segment_shift; |
96 } |
96 } |
97 |
97 |
98 inline bool ZLiveMap::get(size_t index) const { |
98 inline bool ZLiveMap::get(size_t index) const { |
99 BitMap::idx_t segment = index_to_segment(index); |
99 BitMap::idx_t segment = index_to_segment(index); |
100 return is_marked() && // Page is marked |
100 return is_marked() && // Page is marked |