summaryrefslogtreecommitdiffstats
path: root/runtime/base/bit_vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/base/bit_vector.h')
-rw-r--r--runtime/base/bit_vector.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/base/bit_vector.h b/runtime/base/bit_vector.h
index c8f285e..a496dbd 100644
--- a/runtime/base/bit_vector.h
+++ b/runtime/base/bit_vector.h
@@ -119,7 +119,9 @@ class BitVector {
bool SameBitsSet(const BitVector *src);
uint32_t NumSetBits() const;
- uint32_t NumSetBits(uint32_t num) const;
+
+ // Number of bits set in range [0, end).
+ uint32_t NumSetBits(uint32_t end) const;
Iterator* GetIterator() const;
@@ -135,6 +137,11 @@ class BitVector {
*/
int GetHighestBitSet() const;
+ // Is bit set in storage. (No range check.)
+ static bool IsBitSet(const uint32_t* storage, uint32_t num);
+ // Number of bits set in range [0, end) in storage. (No range check.)
+ static uint32_t NumSetBits(const uint32_t* storage, uint32_t end);
+
private:
Allocator* const allocator_;
const bool expandable_; // expand bitmap if we run out?