MCPcopy Create free account
hub / github.com/F-Stack/f-stack / hashdestroy

Function hashdestroy

freebsd/kern/subr_hash.c:92–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 13

ksem_module_destroyFunction · 0.70
in_pcbinfo_destroyFunction · 0.50
ip_destroyFunction · 0.50
in_pcbgroup_destroyFunction · 0.50
deinit_siftrFunction · 0.50
ip6_destroyFunction · 0.50
ng_socket_free_privFunction · 0.50
ngs_rehashFunction · 0.50
ng_name_rehashFunction · 0.50
ng_ID_rehashFunction · 0.50
vnet_netgraph_uninitFunction · 0.50
spdcache_destroyFunction · 0.50

Calls 2

LIST_HEADFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected