MCPcopy Index your code
hub / github.com/F-Stack/f-stack / hashdestroy

Function hashdestroy

lib/ff_kern_subr.c:94–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void
95hashdestroy(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
106static const int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531,
107 2039, 2557, 3067, 3583, 4093, 4603, 5119, 5623, 6143,

Callers 3

ng_name_rehashFunction · 0.70
ng_ID_rehashFunction · 0.70
vnet_netgraph_uninitFunction · 0.70

Calls 2

LIST_HEADFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected