Lines Matching refs:addr
147 const uintptr_t addr = CoverBegin() + bit_index * kAlignment; in AddrFromBitIndex() local
148 DCHECK_EQ(BitIndexFromAddr(addr), bit_index); in AddrFromBitIndex()
149 return addr; in AddrFromBitIndex()
153 ALWAYS_INLINE uintptr_t BitIndexFromAddr(uintptr_t addr) const { in BitIndexFromAddr() argument
154 DCHECK(HasAddress(addr)) << CoverBegin() << " <= " << addr << " < " << CoverEnd(); in BitIndexFromAddr()
155 return (addr - CoverBegin()) / kAlignment; in BitIndexFromAddr()
158 ALWAYS_INLINE bool HasAddress(const uintptr_t addr) const { in HasAddress() argument
159 return cover_begin_ <= addr && addr < cover_end_; in HasAddress()
162 ALWAYS_INLINE bool Set(uintptr_t addr) { in Set() argument
163 return SetBit(BitIndexFromAddr(addr)); in Set()
166 ALWAYS_INLINE bool Clear(size_t addr) { in Clear() argument
167 return ClearBit(BitIndexFromAddr(addr)); in Clear()
170 ALWAYS_INLINE bool Test(size_t addr) const { in Test() argument
171 return TestBit(BitIndexFromAddr(addr)); in Test()
175 ALWAYS_INLINE bool AtomicTestAndSet(size_t addr) { in AtomicTestAndSet() argument
176 return AtomicTestAndSetBit(BitIndexFromAddr(addr)); in AtomicTestAndSet()