MCPcopy Create free account
hub / github.com/F-Stack/f-stack / htNeedsResize

Function htNeedsResize

app/redis-6.2.6/src/server.c:1553–1560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1551};
1552
1553int 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 */

Callers 6

hashTypeDeleteFunction · 0.85
tryResizeHashTablesFunction · 0.85
setTypeRemoveFunction · 0.85
zsetDelFunction · 0.85
zremrangeGenericCommandFunction · 0.85
zdiffAlgorithm2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected