/* 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); } }
原文:http://www.cnblogs.com/vonzhou/p/3795190.html