/* Expands ‘hmap‘, if necessary, to optimize the performance of searches. */ void hmap_expand(struct hmap *hmap) { size_t new_mask = calc_mask(hmap->n); if (new_mask > hmap->mask) { COVERAGE_INC(hmap_expand); resize(hmap, new_mask); } }
rtyeer
时间: 2024-12-14 05:36:32