Lines Matching defs:hashsize
86 unsigned hashsize;
114 if (!hmap->hashsize) {
118 for (unsigned i = 0; i < hmap->hashsize; i++) {
133 kmem_free(hmap->bucket, hmap->hashsize * sizeof(lpm_ent_t *));
135 hmap->hashsize = 0;
173 unsigned hashsize;
175 for (hashsize = 1; hashsize < size; hashsize <<= 1) {
178 bucket = kmem_zalloc(hashsize * sizeof(lpm_ent_t *), flags);
181 for (unsigned n = 0; n < hmap->hashsize; n++) {
187 const unsigned i = hash & (hashsize - 1);
195 kmem_free(hmap->bucket, hmap->hashsize * sizeof(lpm_ent_t *));
197 hmap->hashsize = hashsize;
209 if (hmap->hashsize < target && !hashmap_rehash(hmap, target, flags)) {
214 i = hash & (hmap->hashsize - 1);
238 const unsigned i = hash & (hmap->hashsize - 1);
241 if (hmap->hashsize == 0) {
259 const unsigned i = hash & (hmap->hashsize - 1);
262 if (hmap->hashsize == 0) {