Lines Matching defs:hash

118  * The initial hash tables come out of this zone so they can be allocated
248 static void hash_free(struct uma_hash *hash);
455 * based calculations. (stats, hash size, etc.)
486 * Expand the keg hash table.
488 * This is done if the number of slabs is larger than the hash size.
531 * Allocate and zero fill the next sized hash table from the appropriate
535 * hash A new hash structure with the old hash size in uh_hashsize
541 hash_alloc(struct uma_hash *hash, u_int size)
545 KASSERT(powerof2(size), ("hash size must be power of 2"));
547 hash->uh_hashsize = size;
548 alloc = sizeof(hash->uh_slab_hash[0]) * hash->uh_hashsize;
549 hash->uh_slab_hash = (struct slabhead *)malloc(alloc,
552 alloc = sizeof(hash->uh_slab_hash[0]) * UMA_HASH_SIZE_INIT;
553 hash->uh_slab_hash = zone_alloc_item(hashzone, NULL,
555 hash->uh_hashsize = UMA_HASH_SIZE_INIT;
557 if (hash->uh_slab_hash) {
558 bzero(hash->uh_slab_hash, alloc);
559 hash->uh_hashmask = hash->uh_hashsize - 1;
567 * Expands the hash table for HASH zones. This is done from zone_timeout
572 * oldhash The hash you want to expand
573 * newhash The hash structure for the new table
594 * I need to investigate hash algorithms for resizing without a
611 * Free the hash bucket to the appropriate backing store.
614 * slab_hash The hash bucket we're freeing
615 * hashsize The number of entries in that hash bucket
621 hash_free(struct uma_hash *hash)
623 if (hash->uh_slab_hash == NULL)
625 if (hash->uh_hashsize == UMA_HASH_SIZE_INIT)
626 zone_free_item(hashzone, hash->uh_slab_hash, NULL, SKIP_NONE);
628 free(hash->uh_slab_hash, M_UMAHASH);
1662 * Keg header dtor. This frees all data, destroys locks, frees the hash
1819 printf("Creating slab and hash zones.\n");