src/hotspot/share/gc/shared/markBitMap.hpp
changeset 52577 5b87d3fc1093
parent 51578 31b159f30fb2
child 53244 9807daeb47c4
equal deleted inserted replaced
52576:367ca5f32505 52577:5b87d3fc1093
    47   }
    47   }
    48   // Convert from address to bit offset.
    48   // Convert from address to bit offset.
    49   size_t addr_to_offset(const HeapWord* addr) const {
    49   size_t addr_to_offset(const HeapWord* addr) const {
    50     return pointer_delta(addr, _covered.start()) >> _shifter;
    50     return pointer_delta(addr, _covered.start()) >> _shifter;
    51   }
    51   }
       
    52 
       
    53   // Clear bitmap range
       
    54   void do_clear(MemRegion mr, bool large);
       
    55 
    52 public:
    56 public:
    53   static size_t compute_size(size_t heap_size);
    57   static size_t compute_size(size_t heap_size);
    54   // Returns the amount of bytes on the heap between two marks in the bitmap.
    58   // Returns the amount of bytes on the heap between two marks in the bitmap.
    55   static size_t mark_distance();
    59   static size_t mark_distance();
    56   // Returns how many bytes (or bits) of the heap a single byte (or bit) of the
    60   // Returns how many bytes (or bits) of the heap a single byte (or bit) of the
    86   inline void clear(HeapWord* addr);
    90   inline void clear(HeapWord* addr);
    87   inline void clear(oop obj);
    91   inline void clear(oop obj);
    88   inline bool par_mark(HeapWord* addr);
    92   inline bool par_mark(HeapWord* addr);
    89   inline bool par_mark(oop obj);
    93   inline bool par_mark(oop obj);
    90 
    94 
    91   void clear_range(MemRegion mr);
    95   // Clear bitmap.
       
    96   void clear()                         { do_clear(_covered, true); }
       
    97   void clear_range(MemRegion mr)       { do_clear(mr, false);      }
       
    98   void clear_range_large(MemRegion mr) { do_clear(mr, true);       }
    92 };
    99 };
    93 
   100 
    94 #endif // SHARE_VM_GC_SHARED_MARKBITMAP_HPP
   101 #endif // SHARE_VM_GC_SHARED_MARKBITMAP_HPP