src/hotspot/share/memory/metaspace/blockListArray.hpp
branchstuefe-new-metaspace-branch
changeset 59271 1558266946de
parent 59257 990b1fed3b47
equal deleted inserted replaced
59257:990b1fed3b47 59271:1558266946de
    62 
    62 
    63   bool get_bit(int pos) const    { return (_mask & mask_for_pos(pos)) != 0 ? true : false; }
    63   bool get_bit(int pos) const    { return (_mask & mask_for_pos(pos)) != 0 ? true : false; }
    64   void set_bit(int pos)          { _mask |= mask_for_pos(pos); }
    64   void set_bit(int pos)          { _mask |= mask_for_pos(pos); }
    65   void clr_bit(int pos)          { _mask &= ~mask_for_pos(pos); }
    65   void clr_bit(int pos)          { _mask &= ~mask_for_pos(pos); }
    66 
    66 
    67   // Starting at (including) pos, find the position of the next 1 bit.
    67   // Starting at the position following pos, find the 1 bit.
    68   // Return -1 if not found.
    68   // Return its position, or -1 if not found.
    69   inline int find_next_set_bit(int pos) const;
    69   inline int find_next_set_bit(int pos) const;
    70 
    70 
    71   static int size() { return sizeof(mask_type) * 8; }
    71   static int size() { return sizeof(mask_type) * 8; }
    72 
    72 
    73 };
    73 };
   144 
   144 
   145   void statistics(block_stats_t* stats) const;
   145   void statistics(block_stats_t* stats) const;
   146 
   146 
   147   void print(outputStream* st) const;
   147   void print(outputStream* st) const;
   148 
   148 
       
   149   // Returns true if the array contains no blocks.
       
   150   bool is_empty() const { return _map.all_zero(); }
       
   151 
   149 };
   152 };
   150 
   153 
   151 
   154 
   152 } // namespace metaspace
   155 } // namespace metaspace
   153 
   156