| 1551 | }; |
| 1552 | |
| 1553 | int htNeedsResize(dict *dict) { |
| 1554 | long long size, used; |
| 1555 | |
| 1556 | size = dictSlots(dict); |
| 1557 | used = dictSize(dict); |
| 1558 | return (size > DICT_HT_INITIAL_SIZE && |
| 1559 | (used*100/size < HASHTABLE_MIN_FILL)); |
| 1560 | } |
| 1561 | |
| 1562 | /* If the percentage of used slots in the HT reaches HASHTABLE_MIN_FILL |
| 1563 | * we resize the hash table to save memory */ |
no outgoing calls
no test coverage detected