HASHINIT(9) BSD Kernel Manual HASHINIT(9)
hashinit - kernel hashtable functions
#include <sys/systm.h> void * hashinit(int num, int type, int flags, u_long *mask);
The hashinit() function is used to allocate a hashtable of a desired size given by the num argument. The hashinit() 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) func- tion unchanged. The mask argument is used to pass back the mask for use with the allocated hashing table. For an example of its use, see hash(9).
The hashinit() function returns a pointer to the allocated and initial- ized hash table.
free(9), hash(9), malloc(9)
The hashinit() function currently only allocates hash tables with LIST bucket pointers at this time. Future enhancements to allocate QUEUE buck- et pointers may be warranted. This may necessitate an API change to ac- commodate.
The hashinit function first appeared in 4.4BSD. MirOS BSD #10-current December 8, 2001 1
Generated on 2014-07-04 21:17:45 by $MirOS: src/scripts/roff2htm,v 1.79 2014/02/10 00:36:11 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002‒2014 The MirOS Project, Germany.
This product includes material provided by Thorsten Glaser.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.