| 87 | } |
| 88 | |
| 89 | Bin<ChunkType>* GetBin(const void* ptr) const { |
| 90 | const auto k = |
| 91 | reinterpret_cast<std::uintptr_t>(ptr) >> page_shift_; |
| 92 | const auto i1 = k >> kLeafBits; |
| 93 | const auto i2 = k & (kLeafLength - 1); |
| 94 | if ((k >> bits_) > 0 || root_[i1] == nullptr) { |
| 95 | return nullptr; |
| 96 | } |
| 97 | return root_[i1]->bin[i2]; |
| 98 | } |
| 99 | |
| 100 | void SetBin(const void* ptr, Bin<ChunkType>* b) { |
| 101 | const auto start = |
no outgoing calls
no test coverage detected