src/hotspot/share/memory/metaspace/blockListArray.hpp
branchstuefe-new-metaspace-branch
changeset 59271 1558266946de
parent 59257 990b1fed3b47
--- a/src/hotspot/share/memory/metaspace/blockListArray.hpp	Mon Nov 25 16:35:14 2019 +0100
+++ b/src/hotspot/share/memory/metaspace/blockListArray.hpp	Tue Nov 26 11:29:20 2019 +0100
@@ -64,8 +64,8 @@
   void set_bit(int pos)          { _mask |= mask_for_pos(pos); }
   void clr_bit(int pos)          { _mask &= ~mask_for_pos(pos); }
 
-  // Starting at (including) pos, find the position of the next 1 bit.
-  // Return -1 if not found.
+  // Starting at the position following pos, find the 1 bit.
+  // Return its position, or -1 if not found.
   inline int find_next_set_bit(int pos) const;
 
   static int size() { return sizeof(mask_type) * 8; }
@@ -146,6 +146,9 @@
 
   void print(outputStream* st) const;
 
+  // Returns true if the array contains no blocks.
+  bool is_empty() const { return _map.all_zero(); }
+
 };