Lines Matching refs:hash

116  * The initial hash tables come out of this zone so they can be allocated
251 static void hash_free(struct uma_hash *hash);
446 * based calculations. (stats, hash size, etc.)
476 * Expand the keg hash table.
478 * This is done if the number of slabs is larger than the hash size.
521 * Allocate and zero fill the next sized hash table from the appropriate
525 * hash A new hash structure with the old hash size in uh_hashsize
531 hash_alloc(struct uma_hash *hash)
536 oldsize = hash->uh_hashsize;
540 hash->uh_hashsize = oldsize * 2;
541 alloc = sizeof(hash->uh_slab_hash[0]) * hash->uh_hashsize;
542 hash->uh_slab_hash = (struct slabhead *)malloc(alloc,
545 alloc = sizeof(hash->uh_slab_hash[0]) * UMA_HASH_SIZE_INIT;
546 hash->uh_slab_hash = zone_alloc_item(hashzone, NULL,
548 hash->uh_hashsize = UMA_HASH_SIZE_INIT;
550 if (hash->uh_slab_hash) {
551 bzero(hash->uh_slab_hash, alloc);
552 hash->uh_hashmask = hash->uh_hashsize - 1;
560 * Expands the hash table for HASH zones. This is done from zone_timeout
565 * oldhash The hash you want to expand
566 * newhash The hash structure for the new table
587 * I need to investigate hash algorithms for resizing without a
604 * Free the hash bucket to the appropriate backing store.
607 * slab_hash The hash bucket we're freeing
608 * hashsize The number of entries in that hash bucket
614 hash_free(struct uma_hash *hash)
616 if (hash->uh_slab_hash == NULL)
618 if (hash->uh_hashsize == UMA_HASH_SIZE_INIT)
619 zone_free_item(hashzone, hash->uh_slab_hash, NULL, SKIP_NONE);
621 free(hash->uh_slab_hash, M_UMAHASH);
1679 * Keg header dtor. This frees all data, destroys locks, frees the hash
1840 printf("Creating slab and hash zones.\n");