Home | History | Annotate | Download | only in dev

Lines Matching defs:lgcapacity

138 	uint32_t lgcapacity;
153 #define NEED_REHASH(s) ((s)->used * 2 >= 1 << (s)->lgcapacity)
163 static uint32_t store_idx(uint32_t lgcapacity,
180 s->lgcapacity = INITIALLGCAPACITY;
181 s->table = kmem_zalloc(sizeof(*s->table)<<s->lgcapacity, KM_SLEEP);
189 kmem_free(s->table, sizeof(*s->table)<<s->lgcapacity);
547 kmem_free(s->table, sizeof(*s->table)<<s->lgcapacity);
565 if ( s->used >= 1 << s->lgcapacity )
578 s->idx = store_idx(s->lgcapacity, s->table, s->key, mask);
646 store_idx(uint32_t lgcapacity, uint64_t *table,
655 h1 = ((k * 0x61c88646) >> (32-lgcapacity)) & ((1<<lgcapacity) - 1);
656 h2 = ((k * 0x9e3779b9) >> (32-lgcapacity)) & ((1<<lgcapacity) - 1);
661 idx += 1<<lgcapacity;
680 oldlgcap = s->lgcapacity;
681 newlgcap = oldlgcap + s->lgcapacity;
688 * If s->lgcapacity is changed from what we saved int oldlgcap
690 * XXXMRG but only function changes s->lgcapacity from its
694 if (oldlgcap != s->lgcapacity) {
702 for (oidx = 1 << s->lgcapacity ; oidx-- > 0 ; ) {
715 s->lgcapacity = newlgcap;