| 92 | } |
| 93 | |
| 94 | void |
| 95 | hashdestroy(void *vhashtbl, struct malloc_type *type, u_long hashmask) |
| 96 | { |
| 97 | LIST_HEAD(generic, generic) *hashtbl, *hp; |
| 98 | |
| 99 | hashtbl = vhashtbl; |
| 100 | for (hp = hashtbl; hp <= &hashtbl[hashmask]; hp++) |
| 101 | KASSERT(LIST_EMPTY(hp), ("%s: hashtbl %p not empty " |
| 102 | "(malloc type %s)", __func__, hashtbl, type->ks_shortdesc)); |
| 103 | free(hashtbl, type); |
| 104 | } |
| 105 | |
| 106 | static const int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531, |
| 107 | 2039, 2557, 3067, 3583, 4093, 4603, 5119, 5623, 6143, |
no test coverage detected