__ham_init_htab(hashp, nelem)
__ham_init_htab(hashp, nelem, ffactor)
__ham_init_htab(hashp, nelem)	HTAB *hashp;	u_int nelem;{	int32_t l2, nbuckets;	hashp->hdr->nelem = 0;	hashp->hdr->pagesize = hashp->dbp->pgsize;	ZERO_LSN(hashp->hdr->lsn);	hashp->hdr->magic = DB_HASHMAGIC;	hashp->hdr->version = DB_HASHVERSION;	if (hashp->hash == NULL)		hashp->hash =		    hashp->hdr->version < 5 ? __ham_func4 : __ham_func5;	hashp->hdr->h_charkey = hashp->hash(CHARKEY, sizeof(CHARKEY));	if (nelem != 0 && hashp->hdr->ffactor != 0) {		nelem = (nelem - 1) / hashp->hdr->ffactor + 1;		l2 = __db_log2(nelem > 2 ? nelem : 2);	} else		l2 = 2;	nbuckets = 1 << l2;	hashp->hdr->spares[l2] = 0;	hashp->hdr->spares[l2 + 1] = 0;	hashp->hdr->ovfl_point = l2;	hashp->hdr->last_freed = PGNO_INVALID;	hashp->hdr->max_bucket = hashp->hdr->high_mask = nbuckets - 1;	hashp->hdr->low_mask = (nbuckets >> 1) - 1;	memcpy(hashp->hdr->uid, hashp->dbp->lock.fileid, DB_FILE_ID_LEN);}