Return a pointer to slot that points to a cache entry that matches key/hash. If there is no such cache entry, return a pointer to the trailing slot in the corresponding linked list.
| 150 | // matches key/hash. If there is no such cache entry, return a |
| 151 | // pointer to the trailing slot in the corresponding linked list. |
| 152 | HandleBase** FindPointer(const Slice& key, uint32_t hash) { |
| 153 | HandleBase** ptr = &list_[hash & (length_ - 1)]; |
| 154 | while (*ptr != nullptr && |
| 155 | ((*ptr)->hash() != hash || key != (*ptr)->key())) { |
| 156 | ptr = &(*ptr)->next_handle_; |
| 157 | } |
| 158 | return ptr; |
| 159 | } |
| 160 | |
| 161 | void Resize() { |
| 162 | uint32_t new_length = 16; |