|HASHINIT(9)||Kernel Developer's Manual||HASHINIT(9)|
— kernel hashtable functions
num, int type,
*hash, int num,
function is used to allocate a hashtable of a desired size given by the
num argument. The
function will round this number to the next power of two, and allocate and
initialize the requested hashtable. The type and
flags arguments are passed to the
malloc(9) function unchanged. The
mask argument is used to pass back the mask for use
with the allocated hashing table.
function causes memory allocated by the
function to be released. The num and
type arguments of related calls must match.
hashinit() function returns a pointer
to the allocated and initialized hash table.
hashinit() function currently only
allocates hash tables with LIST bucket pointers at this time. Future
enhancements to allocate QUEUE bucket pointers may be warranted. This may
necessitate an API change to accommodate.
hashinit function first appeared in
|September 24, 2016||OpenBSD-current|