| 1668 | }; |
| 1669 | |
| 1670 | int htNeedsResize(dict *dict) { |
| 1671 | long long size, used; |
| 1672 | |
| 1673 | size = dictSlots(dict); |
| 1674 | used = dictSize(dict); |
| 1675 | return (size > DICT_HT_INITIAL_SIZE && |
| 1676 | (used*100/size < HASHTABLE_MIN_FILL)); |
| 1677 | } |
| 1678 | |
| 1679 | /* If the percentage of used slots in the HT reaches HASHTABLE_MIN_FILL |
| 1680 | * we resize the hash table to save memory */ |
no outgoing calls
no test coverage detected