< prev index next >

src/share/vm/utilities/bitMap.hpp

Print this page
rev 8928 : 8211926: Catastrophic size_t underflow in BitMap::*_large methods
Reviewed-by: kbarrett, stuefe

@@ -54,10 +54,14 @@
 
   // Puts the given value at the given offset, using resize() to size
   // the bitmap appropriately if needed using factor-of-two expansion.
   void at_put_grow(idx_t index, bool value);
 
+  // Threshold for performing small range operation, even when large range
+  // operation was requested. Measured in words.
+  static const size_t small_range_words = 32;
+
  protected:
   // Return the position of bit within the word that contains it (e.g., if
   // bitmap words are 32 bits, return a number 0 <= n <= 31).
   static idx_t bit_in_word(idx_t bit) { return bit & (BitsPerWord - 1); }
 

@@ -95,10 +99,12 @@
   void      set_range_of_words         (idx_t beg, idx_t end);
   void      clear_range_of_words       (idx_t beg, idx_t end);
   void      set_large_range_of_words   (idx_t beg, idx_t end);
   void      clear_large_range_of_words (idx_t beg, idx_t end);
 
+  static bool is_small_range_of_words(idx_t beg_full_word, idx_t end_full_word);
+
   // The index of the first full word in a range.
   idx_t word_index_round_up(idx_t bit) const;
 
   // Verification.
   inline void verify_index(idx_t index) const NOT_DEBUG_RETURN;
< prev index next >