Pop a free entry index from stack and return the index
| 316 | |
| 317 | // Pop a free entry index from stack and return the index |
| 318 | EntryIndex PopFreeEntryIndex() { |
| 319 | if (free_entry_indices_.empty()) { |
| 320 | ExpandEntries(); |
| 321 | } |
| 322 | size_t idx = free_entry_indices_.top(); |
| 323 | free_entry_indices_.pop(); |
| 324 | return idx; |
| 325 | } |
| 326 | |
| 327 | // Try to add (key, value) to the bucket indexed by bucket_idx |
| 328 | // Return the pointer to the entry if success. Otherwise return nullptr. |